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

Re: css syntax - easy question

  • To: Laura Kertz <kertz@l...>
  • Subject: Re: css syntax - easy question
  • From: "M. David Peterson" <m.david.x2x2x@g...>
  • Date: Sat, 9 Jul 2005 02:51:00 -0600
  • Cc: xml-dev@l...
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=poGBGQ8ltPfDbaZ6EB1YEj9AsqNgDoUidoTM2S7CXlW9h4G/i2zVVU6ls4r7+p61Ck8meXdiaTjY6V2t7TGa0xV59rgJj6djyjV8B5gygnqqT0t3g1Kto3vNar3ApTLOtRoW2IKj1QjXAqu3RDEdI26ZkHHGSggDxOsXHmxN9rw=
  • In-reply-to: <6.2.1.2.0.20050708085046.03a35f18@l...>
  • References: <6.2.1.2.0.20050708085046.03a35f18@l...>
  • Reply-to: "M. David Peterson" <m.david.x2x2x@g...>

proper css syntax
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.