|
Posted by Andy Dingley on 04/20/07 13:30
On 20 Apr, 04:18, "Jon Slaughter" <Jon_Slaugh...@Hotmail.com> wrote:
> <div class="Box1">
> <span></span><span></span><span></span>
> <span></span><span></span><span></span>
Try this insted
<div class="Box1">
<span class="foo" ></span><span class="bar" ></span><span
class="bat" ></span>
<span class="woof" ></span><span class="bark" ></span><span
class="donkey" ></span>
..Box1 span.foo { ... }
..Box1 span.bar { ... }
..Box1 span.bat { ... }
..Box1 span.woof { ... }
..Box1 span.bark { ... }
..Box1 span.donkey { ... }
Nice simple selectors, no dependence on ordering, all selectors are of
equal specificity in the cascade (and so are unlikely to surprise
you).
Keep the outer "Box1" as a class, not an id. You can use both, but use
the class name as the CSS selector, not the id. This avoids some
trouble with high-specificity CSS selectors cascading above others.
Navigation:
[Reply to this message]
|