Utilizing server-side script, I am dynamically adding divs that display images of album covers. Below is the structure of the HTML:
<div id="releases">
<div class="album">
<div class="cover"><img src="cover.jpg" /><br />Artist</div>
</div>
<div class="album">
<div class="cover"><img src="cover.jpg" /><br />Artist</div>
</div>
<div class="album">
<div class="cover"><img src="cover.jpg" /><br />Artist</div>
</div>
</div>
Below you can find my current CSS:
#releases {
margin: 20px 0;
width: 100%;
}
#releases div.album {
float: left;
margin-right: 15px;
width: 100%;
max-width: 118px;
}
#releases div.album .cover {
padding: 2px;
background: #fff;
box-shadow: 1px 1px 2px #a9aaa8;
}
#releases div.album .cover img {
width: 100%;
vertical-align: middle;
}
I am now working on adding margin right to all albums in order to create some spacing between them, however, I would like to avoid having margin before the first and after the last div. Additionally, I am looking into making this design responsive so that the cover artwork and cover div adjust based on the size of the "releases" div.