162 CHAPTER 5 DISPLAYING XML USING CSS (Professional web hosting)

162 CHAPTER 5 DISPLAYING XML USING CSS paragraph3:before { font-weight:bold; text-transform:uppercase; content:”Text before paragraph 3 - “; } The styling for the fourth paragraph adds an image at the end of the paragraph, using url(imageLocation) as the value of the content property. Again, this works in Netscape, Firefox, and Opera: paragraph4:after { content: url(lions.jpg); } Safari also supports pseudo-elements, but IE for Macintosh doesn t. Figure 5-21 shows the effect of the styling on the
and
elements. I ve excluded the first two elements from the screen shot for obvious reasons. Figure 5-21. It s possible to add content using pseudo-elements in CSS declarations. In the next section, I want to show you how to work with content from XML attributes. Working with Attribute Content The preceding examples all use element names as selectors for the style declarations. What happens when it comes to displaying the content stored in attributes? In this section, you ll see how to use attributes in selectors, and how to access attribute values in XML documents.
If you are searching for cheap webhost for your web application, please visit MySQL5 Web Hosting services.

Leave a Reply