PDA

View Full Version : :last-child not working?


student101
09-20-2008, 08:57 AM
This last child option is neat but it aint workin?

navcontainer ul {
border: 0;
margin: 0;
padding: 0;
list-style-type: none;
text-align: center;
}
#navcontainer ul li {
display: block;
float: left;
text-align: center;
padding: 0;
margin: 0;
}
#navcontainer ul li a {
background: #fff;
width: 78px;
height: 18px;
padding: 0;
margin: 0 0 10px 0;
color: #000; /*#f5d7b4*/
text-decoration: none;
display: block;
text-align: center;
font: normal 12px/16px "Lucida Grande", "Lucida Sans Unicode", verdana, lucida, sans-serif;
border: 1px solid #ccc; /*#f5d7b4*/
border-right:0;
}
#navcontainer ul li a:hover {
color: #930; /*#f5d7b4*/
background-color: #eee;
}
#navcontainer ul li a:last-child {
border-right:1 solid #ccc;
}

Any ideas?

Cheers

student101
09-20-2008, 09:24 AM
Change it to;

#navcontainer ul li:last-child a{
border-right:1px solid #ccc;
}

Works in FF not IE7?
IE7 Sux.

domedia
09-20-2008, 02:48 PM
Change it to;

#navcontainer ul li:last-child a{
border-right:1px solid #ccc;
}

Works in FF not IE7?
IE7 Sux.
CSS3. Not really working really good in many browsers at all. FF3 is good, FF2 still has buggy support. No support at all in IE7 and down.

student101
09-20-2008, 03:36 PM
I decided to code a class and skip the :last-child

#navcontainer ul li.last{
border-right:1px solid #ccc;
}

Cheers

domedia
09-20-2008, 03:41 PM
I decided to code a class and skip the :last-child

#navcontainer ul li.last{
border-right:1px solid #ccc;
}

Cheers
AFAIK, That's the normal way of achieving it :)

student101
09-20-2008, 03:47 PM
With Microsux wanting to dominate in such a terrible way with their non-compliant browsers what else can a man do?

They seem to be making it harder even for network admins.
If you want to change the menus at least allow for the old-style or classic menu so that we can find our way around