I've got a group of four DIV's I'm using as a horizontal navigation area. Ideally, it would look like 4 rectangles, one to the right of the one before it.
I'm using the following CSS for the DIVs:
Code:
#nav {
width: 200px;
display: inline;
border: 1px solid #ff0000;
margin-top: 7px;
margin-bottom: 7px;
}
The HTML implementation looks like this:
HTML Code:
<div id="nav">Home<br><img src="img/nav1.jpg">
</div>
<div id="nav">Gallery<br><img src="img/nav2.jpg">
</div>
<div id="nav">About<br><img src="img/nav3.jpg">
</div>
<div id="nav">Contact<br><img src="img/nav4.jpg">
</div>
In IE, it looks like I'd like it to. I'm still tweaking the CSS, but the basic idea is there. It looks like this:
But it breaks in Firefox when the pictures are added, looking like this:
Any suggestions on how to make this look universal between the two apps, and any hints towards a better, more standard code would be nice. This'll be the first site I've used DIV's in.
Thanks much in advance!
|