CSS border problem - why? (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets and Accessibility



Message


RickP -> CSS border problem - why? (9/10/2005 18:09:48)

I have a problem with a CSS nav border - you should see the problem at once in:

FireFox
Opera
Netscape

The bottom border stops short of the end of each link portion

It appears fine in IE6.

The relevant CSS code is below - Any ideas what's wrong/missing?

Page here

 #navcontainer
{
width: 135px;
padding: 0 0 0 0;
margin-bottom: 0;
margin-left: 20px;
font-family: Verdana, Arial, sans-serif;
background-color: #FFFFEE;
color: #FFFFEE;
}

#navcontainer ul
{
list-style: none;
margin: 0;
padding: 0;
border: none;
}

#navcontainer li
{
border-bottom: 2px solid #777777;
border-right: 1px solid #777777;
margin-bottom: 10px;
}

#navcontainer li a
{
display: block;
padding: 6px 1px 10px 8px;
border-left: 10px solid #5991C5;
background-color: #336699;
font-size: 13px;
color: #FFFFFF;
text-decoration: none;
font-weight: bold;
}

html body #navcontainer li a
{ width: 100%; }

#navcontainer li a:hover
{ border-left: 10px solid #CCCCCC; }

#homepage #nav-homepage, #landscapes #nav-landscapes, #marinescapes #nav-marinescapes, #still-life #still-life, #links #nav-links, #messages #nav-messages
{ border-left: 10px solid #CCCCCC; }




caz -> RE: CSS border problem - why? (9/10/2005 21:39:51)

If you are using Fx with the Web Developer extension use CSS>Border Box Model and it magically looks as it should. You have a box model problem .

Try these links
http://www.mezzoblue.com/zengarden/resources/
http://www.tantek.com/CSS/Examples/boxmodelhack.html




Tailslide -> RE: CSS border problem - why? (9/11/2005 3:52:12)

Try applying the border-bottom to the #navcontainer li a instead of the #navcontainer li - this works in FF but I haven't checked it in IE.




RickP -> RE: CSS border problem - why? (9/11/2005 8:30:19)

Thanks Caz/Tailside

Tailside's fix has sorted the problem[;)]
At least in the four browser tests - as above.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.0625