![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
div class="menu level0 haschildren active">Front page</div |
|
.menu.level0.haschildren.active { ... } |
#3
| |||
| |||
|
|
div class="menu level0 haschildren active">Front page</div Correct. .menu.level0.haschildren.active { ... } You should use: .menu, .level0, .haschildren, .active { ... } Note the commas. |
#4
| |||
| |||
|
|
Uhm, that's not right. You use commas to group classes, such as: .foo { color: red; } .bar { color: red; } .rab { color: red; } Equals: .foo, .bar, .rab { color: red; } |
|
p.pastoral.marine { color: green } This rule matches when class="pastoral blue aqua marine" but does not match for class="pastoral blue"." And this is exactly what I want to do - and it works perfectly in Safari for Mac, but breaks horribly in IE for PC (as most CSS-related stuff do). |
|
Which is why I am asking here if there is any way to achieve the same result as the CSS2.1 specs specify with IE? |
#5
| |||
| |||
|
|
p.pastoral.marine { color: green } This rule matches when class="pastoral blue aqua marine" but does not match for class="pastoral blue"." And this is exactly what I want to do - and it works perfectly in Safari for Mac, but breaks horribly in IE for PC (as most CSS-related stuff do). Actually, it works in IE - I just checked. Either what you're trying to achieve is different or you're doing it wrong somehow. |
|
Which is why I am asking here if there is any way to achieve the same result as the CSS2.1 specs specify with IE? Still not entirely sure what you're trying to do [sorry! i'm pretty tired right now, maybe someone else can help]. Try using less classes though, it's more elegant to say: |
|
#menu ul {...} #menu li { ... } and then maybe start introducing the nested classes. #menu li .subPage { ... } #menu li .active { ... } #menu li .inactive { ... } div id="menu" ul li class="active">...</li li ul li class="subPage inactive">...</li /ul /li /ul /div |
![]() |
| Thread Tools | |
| Display Modes | |
| |