[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: css syntax - easy question


css syntax
Hi.  Thanks for the reply.  You're right, I skipped some colons, but I 
think you get the idea.  I can't really tell though if you answered my 
question. :)

I already know how to make the before selector work to insert content. And 
I already have a handle on the namespace issue. My question was whether i 
could take a short-cut to always pull out the name of the element.  I'm 
thinking not, but wanted to see if anyone knew of such a short cut.

Again,

If I already have something like this working, where I print out the 
element name for each followed by a colon.

name:before {content: "name: "}
phone:before {content: "phone: "}
email:before {content: "email: "}

Could I collapse it all using the * selector? I am not sure what the 
"something here" would be to pull out the element name.

*:before {content: "SOMETHING HERE"}

Sorry if you already answered my question....

Thanks again!



At 01:51 AM 7/9/2005, M. David Peterson wrote:
>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...
>
>http://dean.edwards.name/IE7/
>
>For a good reference of both proper CSS syntax and what you will be
>able use in IE your the IE7 hack visit:
>
>http://dean.edwards.name/IE7/compatibility/index.html
>
>And to better understand CSS namespaces, visit the proposal to the W3C at:
>
>http://www.w3.org/TR/css3-namespace/
>
>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@l...> 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:D/>
>
>M. David Peterson
>http://www.xsltblog.com


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.