Responsive mosaic of images HTML/CSS
Responsive mosaic of images with only css and html.
by web tiki
HTML
<div id="wrap">
<div class="big_col">
<div class="small_img">
<img src="http://www.lorempixum.com/327/491/abstract" alt="" />
<img src="http://www.lorempixum.com/g/327/491" alt="" />
<img src="http://www.lorempixum.com/g/327/491/sports" alt="" />
<img src="http://www.lorempixum.com/327/491/nature" alt="" />
</div>
<div class="medium_img">
<img src="http://www.lorempixum.com/g/327/491/business" alt="" />
<img src="http://www.lorempixum.com/327/491/people" alt="" />
</div>
<div class="small_img">
<img src="http://www.lorempixum.com/g/327/491/food" alt="" />
<img src="http://www.lorempixum.com/327/491" alt="" />
<img src="http://www.lorempixum.com/327/491/cats" alt="" />
<img src="http://www.lorempixum.com/327/491/people" alt="" />
</div>
</div>
<div class="big_col">
<img src="http://www.lorempixum.com/327/491/nature" alt="" />
</div>
<div class="small_col small_img">
<img src="http://www.lorempixum.com/g/327/491/transport" alt="" />
<img src="http://www.lorempixum.com/g/327/491/sports" alt="" />
<img src="http://www.lorempixum.com/327/491/nature" alt="" />
<img src="http://www.lorempixum.com/g/327/491/sports" alt="" />
</div>
<div class="medium_col medium_img">
<img src="http://www.lorempixum.com/327/491/nightlife" alt="" />
<img src="http://www.lorempixum.com/g/327/491/transport" alt="" />
</div>
<div class="small_col small_img">
<img src="http://www.lorempixum.com/327/491/fashion" alt="" />
<img src="http://www.lorempixum.com/327/491/nature" alt="" />
<img src="http://www.lorempixum.com/g/327/491/sports" alt="" />
<img src="http://www.lorempixum.com/327/491" alt="" />
</div>
<div class="big_col">
<img...
CSS
body, html {
width:100%;
margin:0;
padding:0;
}
#wrap {
width:100%;
}
.big_col, .medium_col, .small_col{
float:left;
}
img {
height:auto;
display:block;
margin:0;
padding:0;
border:none;
float:left;
}
.big_col {
width:25%;
}
.medium_col{
width:12.5%;
}
.small_col{
width:6.25%;
}
.small_col img{
width:100%;
}
.medium_col>img {
width:100%;
}
.medium_col .small_img img {
width:50%;
}
.big_col .small_img img {
width:25%;
}
.big_col .medium_img img {
width:50%;
}
.big_col img {
width:100%;
}