<body>
  <header>
    <h1>Photo Gallery </h1>
    <p>with Shadow Effects</p>
  </header>
    <div>
    <ul class="box3">
      <li><img src="https://farm3.static.flickr.com/2023/2313208499_94cf139fed_m.jpg" /></li>
      <li><img src="https://farm4.static.flickr.com/3498/3784621369_048892b72a_m.jpg" /></li>
      <li><img src="https://farm1.static.flickr.com/40/108061559_d56c9c8a97_m.jpg" /></li>
    </ul>
    <ul class="box2">
      <li><img src="https://farm4.static.flickr.com/3022/2315482595_124fbdc487_m.jpg" /></li>
      <li><img src="http://farm9.staticflickr.com/8388/8461978995_1a4a48ca14_c.jpg" /></li>
      <li><img src="http://farm9.staticflickr.com/8094/8477608906_a02f8d5774_z.jpg" /></li>
    </ul>
    <ul class="box4">
      <li><img src="http://farm9.staticflickr.com/8233/8500935165_2835685f30.jpg" /></li>
      <li><img src="http://farm9.staticflickr.com/8507/8412935103_b1af667772_z.jpg" /></li>
      <li><img src="https://farm4.static.flickr.com/3060/2880411195_5df0515f2d_m.jpg" /></li>
	</ul>
      <ul class="box">
      <li><img src="https://farm9.static.flickr.com/8297/7817397336_6d6dae6636_m.jpg" /></li>
      <li><img src="https://farm1.static.flickr.com/130/340521767_939dad7899_m.jpg" /></li>
      <li><img src="https://farm9.static.flickr.com/8425/7519811834_18f7dd2b8c_m.jpg" /></li>
    </ul>
  </div>
</body>
/*---------------------------------------------------*/
/*                  My Styles:                       */
/*---------------------------------------------------*/

/* -------------------------------- 

Primary style

-------------------------------- */
html * {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*, *:after, *:before {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

body {
  font-size: 100%;
  font-family: "Bitter", sans-serif;
  color: #f5f4ed;
  background-color: #e8e8e8;
}



/* White Border around Photos*/
li {
  background-color: #fff;
  padding: 10px;
}

img {
  width: 250px;
  height: 250px;
}

/* -------------------------------- 

Main components 

-------------------------------- */
header {
  background: #454545;
  height: 100px;
  text-align: center;
}
header h1 {
  font-size: 20px;
  font-size: 1.25rem;
  font-weight: bold;
  font-family: "Open Sans", sans-serif;
  text-transform: uppercase;
  font-weight: bold;
  padding-top: 1.6em;
  margin-bottom: .2em;
}
header p {
  font-size: 13px;
  font-size: 1rem;
  color: #707070;
}
@media only screen and (min-width: 1024px) {
  header {
    height: 200px;
  }
  header h1 {
    font-size: 30px;
    font-size: 1.875rem;
    padding-top: 2.6em;
  }
}



/* My Tweaks - Center the boxes on the page */

div {
width:900px;
height:400px;
padding-top: 40px;
margin: 0 auto;
}



/* Source: http://matthamm.com/box-shadow-curl.html */

ul.box, ul.box2, ul.box3, ul.box4 {
position: relative;
z-index: 1; /* prevent shadows falling behind containers with backgrounds */
overflow: hidden;
list-style: none;
margin: 0;
padding: 0; }


ul.box li, ul.box2 li, ul.box3 li, ul.box4 li {
position: relative;
float: left;
margin: 0 30px 30px 0;
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset; }


ul.box li:before,
ul.box li:after,
ul.box2 li:after,
ul.box2 li:before,
ul.box4 li:after {
content: '';
z-index: -1;
position: absolute;
left: 10px;
bottom: 10px;
width: 70%;
max-width: 300px; /* avoid rotation causing ugly appearance at large container widths */
max-height: 100px;
height: 55%;
-webkit-box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
-moz-box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
-webkit-transform: skew(-15deg) rotate(-6deg);
-moz-transform: skew(-15deg) rotate(-6deg);
-ms-transform: skew(-15deg) rotate(-6deg);
-o-transform: skew(-15deg) rotate(-6deg);
transform: skew(-15deg) rotate(-6deg); }



ul.box li:after,
ul.box4 li:after {
left: auto;
right: 10px;
-webkit-transform: skew(15deg) rotate(6deg);
-moz-transform: skew(15deg) rotate(6deg);
-ms-transform: skew(15deg) rotate(6deg);
-o-transform: skew(15deg) rotate(6deg);
transform: skew(15deg) rotate(6deg); }
/* Source: http://matthamm.com/box-shadow-curl.html*/

/* Messed around with the Code to come up with this Photo Gallery */

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.