• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

CSS with XML

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can I use CSS to render my XML documents. How?
 
Leverager of our synergies
Posts: 10065
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes!
First you link your XML document to external CSS stylesheet:
<?xml-stylesheet type=�text/css� href=�myStylesheet.css� ?>
And then, if you have an element with "myElement" name, for example, you can link it with CSS rules as
myElement
{ background-color: white;
border-color: blue;
font-size: 80%
...
}
I read that it's also possible to use internal CSS:
<?xml-stylesheet type=�text/css� href=�#myStylesheet� ?>
<document>
<CSS id=�myStylesheet�>
myElement { some rules here
}
</CSS>
<myElement>blah-blah-blah</myElement>
</document>
but it did not work for me...
 
If I'd had more time, I would have written a shorter letter. -T.S. Eliot such a short, tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic