The use of conditions within the browser is often used to decide which style sheet to load depending on the type of browser. For example we can use this code to load a particular style sheet when the browser is Internet Explorer 6:
Articles Tagged 'Styles'
Very short trick: Conditional CSS and optimization
Inserting text with CSS: IE7, a bad deal
Again, when I find myself writing about the capabilities of style sheets, I am forced to put aside Microsoft Internet Explorer! e after . With CSS2 introduced a very interesting feature, property, content , used in conjunction with pseudo-elements before and after . Through this "style" you can alter the content of a site acting exclusively on the CSS file. For example if we write:
1 | content : ">>" } li: before {content: ">>"} |
) avrà ogni elemento preceduto dai caratteri “>>”! A bulleted list ( UL , LI ) will be preceded with every element ">>"! Anything, of course, can be treated in this way:
1 |
1 | content : "-->" } div p: before {content: "-->"} |
The versatility of this element does not stop there! It is possible to use other parameters in addition to the simple (but very useful) text. The element content , in fact, it also allows special values or url:
1 2 3 | content : url ( images/quote.gif ) } p: before {content: url (images / quote.gif)} content : close-quote } p: after {content: close-quote} content : url ( waves/sound.wav ) } p: before {content: url (waves / sound.wav)} |
For implementation details refer directly to the W3C - shame it does not even Microsoft!






Latest Comments
datrix : Thank you very much!
Robert : I rispsoto your questions with pleasure. The idea is really great. I am looking for a solution ...
Sting : @ Darius - you can see an example here: http://www.fight4fun.it/ clicking on: MAPS I hope ...
vik : Giustappunto I'm working on a project and the client asked me to show all the news (which are CPT) in ...
Giovambattista Fazioli : @ paso: absolutely. Simply identifying the field [cci] input [/ cci] you want to ...