Gallery Grid Demo : Image « CSS Controls « HTML / CSS






Gallery Grid Demo

 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
  <head>
    <title>Gallery Grid Demo</title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
<style type='text/css'>

.grid {
  display: table;
  border-spacing: 4px;
}
.row {
  display: table-row;
}
.image {
  display: table-cell;
  width: 240px;
  background-color: #000;
  border: 8px solid #000;
  vertical-align: top;
  text-align: center;
}
.image p {
  color: #fff;
  font-size: 85%;
  text-align: left;
  padding-top: 8px;
}
</style>
  </head>
  <body>
    <div class="grid">
      <div class="row">
        <div class="image">
          <img src="http://java2s.com/style/logo.png" alt="A Lily" />
          <p>A lily in the gardens of The Vyne Country House</p>
        </div>
        <div class="image">
          <img src="http://java2s.com/style/logo.png" alt="A Fuchsia plant" />
          <p>Fuchsia plant in my garden</p>
        </div>
      </div>
      <div class="row">
        <div class="image">
          <img src="http://java2s.com/style/logo.png" alt="A crazy looking Allium flower" />
          <p>A crazy looking flower</p>
        </div>
        <div class="image">
          <img src="http://java2s.com/style/logo.png" alt="A Robin sitting on a fence" />
          <p>This robin has been visiting our garden over the summer. He is very friendly and doesn't seem to be too worried about sharing the garden with us.</p>
        </div>
      </div>
    </div>
  </body>
</html>

   
  








Related examples in the same category

1.Image wrap text
2.Image floating
3.Image as list icon
4.Using huge image as background
5.Image and text
6.Huge topic image
7.Image gallary inside the sidebar
8.Image on the left
9.Image centered design
10.Fill left and right side of the content with image pattern
11.Single column with Top image section
12.Anchor hover with image background
13.List with image background
14.Flowing text around an image
15.inline images
16.Adding shading and mask to a picture