Divs: Equal Horizontal Spacing

Posted by Vecta on Stack Overflow See other posts from Stack Overflow or by Vecta
Published on 2011-01-10T21:41:28Z Indexed on 2011/01/10 21:53 UTC
Read the original article Hit count: 91

Filed under:
|

I'm creating a site that has a series of four images on the homepage used as navigation with a large image beneath.

<div style="width: 696px">
<div class="imglink"></div>
<div class="imglink"></div>
<div class="imglink"></div>
<div class="imglink"></div>
</div>

<div style="width:696px">
...
</div>

The "imglink" divs are 160px wide.

I would like the images in the top div to be horizontally spaced evenly inside the div, with the two outer divs flush with the edges of the image below. I've been trying out floats, margins, padding, etc for a couple hours now and can't figure it out.

Thanks for your help!

© Stack Overflow or respective owner

Related posts about html

Related posts about css