Trying to center a block of images horizontally, but struggling to get the alignment right. The HTML code looks like this:
<div id="dealerarea">
<div id="dealercards">
<!--Images by Javascript-->
</div>
</div>
Here's the CSS:
#dealerarea{
position:absolute;
width:100%;
height:96px;
top:15px;
}
#dealercards{
display: block;
margin-left: auto;
margin-right: auto;
}
Any idea what might be going wrong? Appreciate any help!
Note: Can't set a fixed "width" to the inner div because it varies depending on the number of images.