OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] css syntax - easy question

[ Lists Home | Date Index | Thread Index ]

First, use the proper selector syntax: (e.g ::before)

name::before {
       content: "name:"

But that won't work either because there is no "name", "address", or
"phone" element in any HTML or XHTML spec...

but thats ok cuz' you can just create your own using namespaces in CSS
and then use your own custom tag names giving them cusom values for
any of the supported CSS attribute for the browser you happen to be
using/developing for...

Now, with IE you have to turn your baseball cap backwards and take on
a hacker's slouch cuz' to get XML namespaces in IE requires the need
of some hackin' to get things to work good and proper.

Not to fret though, the hackin's already been done for you...

Just make a visit to Dr. Dean Edwards and within a few hours of
learning all you could possibly ever want to know about CSS and its
lack of support in any current IE release you'll be good to go...


For a good reference of both proper CSS syntax and what you will be
able use in IE your the IE7 hack visit:


And to better understand CSS namespaces, visit the proposal to the W3C at:


If wondering, you read "proposal" correctly... although support exists
in all major browsers (IE with the IE7 hack... but for a 1999
proposal, thats still a proposal, you can't be crying foul and instead
should send Dean a quick "thanks" for having mercy on the rest of our
hacking souls :)

Good luck to you :D

BTW... Dean Edwards and "IE7" =  no MS affiliation

On 7/8/05, Laura Kertz <kertz@ling.ucsd.edu> wrote:
> Hi,
> I'm trying to take a short-cut using CSS, but can't figure out how.  What I
> want to do is print the element name before the element content, something
> like this below:
> name before {
>         content: "name:"
> }
> address before {
>         content: "address: "
> }
> phone before {
>         content: "phone: "
> }
> etc..
> But it seems like there should be something ("blah" below) that I could use
> to catch all of these, instead of hand-coding each one.  Something along
> these lines:
> * before {
>         content: blah":"
> }
> Is there any such thing?  (I'm not finding it.)  I know I could do this
> with a perl script or just using XSLT instead of CSS, but of course, I need
> to do it in CSS. Any ideas?
> Thanks.
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
> The list archives are at http://lists.xml.org/archives/xml-dev/
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://www.oasis-open.org/mlmanage/index.php>


M. David Peterson


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS