Tile layout image with caption - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Image Caption

Description

Tile layout image with caption

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
ul {<!-- w w w  .j  av a 2 s.  c om-->
   margin:0;
   padding:0;
}

li {
   list-style-type:none;
}

.content {
   width:1141px;
   margin:0 auto;
   text-align:center;
}

.content .content_row {
   display:table;
   border-spacing:11px
}

.content .content_row li {
   display:table-cell;
   background-color:Chartreuse;
   -webkit-border-radius:21px;
   -moz-border-radius:21px;
   border-radius:21px;
}

.content .content_row li img {
   -webkit-border-top-left-radius:21px;
   -webkit-border-top-right-radius:21px;
   -moz-border-radius-topleft:21px;
   -moz-border-radius-topright:21px;
   border-top-left-radius:21px;
   border-top-right-radius:21px;
   overflow:hidden;
   display:block;
}

.content .content_row li .item_desc {
   text-align:center;
}
</style> 
 </head> 
 <body> 
  <div class="content"> 
   <ul class="content_row"> 
    <li> <img src="https://www.java2s.com/style/demo/InternetExplorer.png"> 
     <div class="item_desc">
       Lor 
      <br>Lor 
      <br>Lor 
     </div> </li> 
    <li> <img src="https://www.java2s.com/style/demo/Safari.png"> 
     <div class="item_desc">
       Lor 
      <br>Lor 
      <br>Lor 
      <br>Lor 
     </div> </li> 
    <li> <img src="https://www.java2s.com/style/demo/Google-Chrome.png"> 
     <div class="item_desc">
       Lor 
     </div> </li> 
    <li> <img src="https://www.java2s.com/style/demo/Opera.png"> 
     <div class="item_desc">
       Lor 
      <br>Lor 
      <br> 
     </div> </li> 
    <li> <img src="https://www.java2s.com/style/demo/Firefox.png"> 
     <div class="item_desc">
       Lor 
     </div> </li> 
   </ul> 
   <ul class="content_row"> 
    <li> <img src="https://www.java2s.com/style/demo/Firefox.png"> 
     <div class="item_desc">
       Lor 
      <br> 
     </div> </li> 
    <li> <img src="https://www.java2s.com/style/demo/InternetExplorer.png"> 
     <div class="item_desc">
       Lor 
      <br>Lor 
      <br>Lor 
     </div> </li> 
    <li> <img src="https://www.java2s.com/style/demo/Opera.png"> 
     <div class="item_desc">
       Lor 
      <br>Lor 
     </div> </li> 
   </ul> 
  </div>  
 </body>
</html>

Related Tutorials