pedroponting
05-29-2007, 04:06 AM
I have a site here:
http://www.menslineaus.org.au
You'll see in IE that the menu items on the left are separated by a 2px wide space that allows the gradient in the background to show through between each menu item. However in FF, there is no gap. I've had similar problems on the same page with a div not displaying a clearly specified margin in FF, though it showed in IE. Here's the CSS for the menu items (I've included all selectors, though the probably relevant one is the second one, where you can see top and bottom margin of 1px):
#vert-menu{
margin-top: 0px;
z-index:2;
width:145px;
padding-bottom:12em; /* To allow room for bottom dropdown */
float:left;
}
#vert-menu a, #vert-menu h2{
font:bold 11px/16px arial,helvetica,sans-serif;
display:block;
border-width:0px;
border-style:solid;
border-color:#ccc #888 #555 #bbb;
background-color: #2c6193;
border-left: 1px solid #81a5c7;
padding: 1px 1px 0px 13px;
margin: 1px 0px 1px 1px;
}
#vert-menu h2{
color:#3e6199;
}
#vert-menu a{
color:#3e6199;
background:#d9e7e8;
text-decoration:none;
}
#vert-menu a:hover{
color:#a00;
}
#vert-menu a:active{
color:#060;
background:#ccc;
}
#vert-menu ul{
list-style:none;
margin:0;
padding:0;
width:100%;
}
So what is it I don't get about CSS margins in FF?
http://www.menslineaus.org.au
You'll see in IE that the menu items on the left are separated by a 2px wide space that allows the gradient in the background to show through between each menu item. However in FF, there is no gap. I've had similar problems on the same page with a div not displaying a clearly specified margin in FF, though it showed in IE. Here's the CSS for the menu items (I've included all selectors, though the probably relevant one is the second one, where you can see top and bottom margin of 1px):
#vert-menu{
margin-top: 0px;
z-index:2;
width:145px;
padding-bottom:12em; /* To allow room for bottom dropdown */
float:left;
}
#vert-menu a, #vert-menu h2{
font:bold 11px/16px arial,helvetica,sans-serif;
display:block;
border-width:0px;
border-style:solid;
border-color:#ccc #888 #555 #bbb;
background-color: #2c6193;
border-left: 1px solid #81a5c7;
padding: 1px 1px 0px 13px;
margin: 1px 0px 1px 1px;
}
#vert-menu h2{
color:#3e6199;
}
#vert-menu a{
color:#3e6199;
background:#d9e7e8;
text-decoration:none;
}
#vert-menu a:hover{
color:#a00;
}
#vert-menu a:active{
color:#060;
background:#ccc;
}
#vert-menu ul{
list-style:none;
margin:0;
padding:0;
width:100%;
}
So what is it I don't get about CSS margins in FF?