Pages: 1
Print
Author Topic: Decorating CSS Content  (Read 3011 times)
Nicolas DEBEAUPTE
Member

Posts: 2


« on: November 24, 2008, 07:45:22 AM »

Hi,

I am trying to evaluate if XMetal can meet my needs and have some questions to ask.

The context is edition of XML file describing technical documentation.

A document is compound with 6 mandatory sections.

Each section is bound to an xml tag  (let's say <Section0> to <Section5>).
Of course each section has a content (chapter, table, ...).

Each section has a title not mentionned in the XML
for eg : Section0 is "0 - GENERALITES - CARACTERISTIQUES" (in french!).

I saw that i can use the css style :

section0:before {
   content : "0 - GENERALITES - CARACTERISTIQUES";
}

it works fine. but how can i decorate this text (bigger colored bolded police, centered text, ...) ?

Counting on your help, thanks for your answers.

Nicolas DEBEAUPTE.
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 1548



WWW
« Reply #1 on: November 24, 2008, 11:52:27 AM »

You can do this type of thing:

section0:before {
   content: "0 - GENERALITES - CARACTERISTIQUES";
   font-family: "Courier New";
   font-size: 2em;
   color: #00F;
   display: block;
   border: 1px solid red;
}

That styling is separate from the associated selector (section0 by itself).
Logged
Xtreme
Member

Posts: 4


« Reply #2 on: November 24, 2008, 11:55:07 AM »

You can also create different styles for a Sections in a Section, for example a different text-size:

section0>section:before{
   content: "0 - GENERALITES - CARACTERISTIQUES";
   font-family: "Courier New";
   font-size: 1.5em;
   color: #00F;
   display: block;
   border: 1px solid red;
}
Logged
Pages: 1
Print
Jump to:  

email us