Daniel Beardsmore wrote:
> That said, creation of otherwise worthless span and div elements to
> satisfy styling needs is just part of life in CSS. I avoid it as much as
> I can, but it does end up being necessary to pull off many tricks. It
> gets worse when you want to pull off tricks that also work in IE.
>
> Yes, what you're going to have to do is tragic, but then, a lot of what
> I see people doing to pull off various layouts seems tragic to me.
To be honest, I have no great gripe with using meaningless spans and
divs. By specification they are not forced to assign meaning anyway, so
I only really worry about massive nesting, and even then it's only for
the sake of standardistas browsing my site in view-source mode (they
don't deserve sympathy anyway!).
However, the vast majority of the time (including right now) I'm
designing for very simple CMS apps, so inserting the extra markup
involves complicated parsing rules, is unreliable and/or impossible.
> I'm hoping that CSS3 goes a long way towards making this all unnecessary.
Selection has come a long way for CSS3 but unless IE is buried by a
massive security hole (not the most paranoid of apocalypse theories), we
won't be able to rely on it until IE gets another revamp (ETA >5 years IMO).
In my head, what makes the most sense for this (as well as plenty of
other span-based techniques such as heading image replacement) is a
selector for text nodes. In a way, couldn't the DOM very easily
differentiate an element from any text within it? Something like
ELEMENT:text{} - It seems so obvious.
Follow-up: Apparently, the effects I'm after can be achieved in Netscape
4 under Windows 95 by using the following rules:
ol,ul{color:red}li{color:black}. I haven't tried this for myself, and
it's completely impractical info, but still worth knowing.
Regards,
Barney
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/