|
Posted by Jon Slaughter on 04/20/07 19:19
"Andy Dingley" <dingbat@codesmiths.com> wrote in message
news:1177075844.610897.84960@e65g2000hsc.googlegroups.com...
> 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.
>
Yeah, maybe better but not completely sure. In either case since the code
will be automatically generated it will be easy to change and I suppose I
can do some actual tests to see the real impact of using the selectors. (I
sorta like the selector method for some reason)
Thanks,
Jon
Navigation:
[Reply to this message]
|