From the course: XML Essential Training

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Advanced CSS with XML

Advanced CSS with XML - XML Tutorial

From the course: XML Essential Training

Start my 1-month free trial

Advanced CSS with XML

- [Teacher] So far we've seen how to style XML code using CSS and have the browser to display the contents of XML tags instead of the XML document tree. But the problem that we run into is that we don't have a way to put the labels in front of the content of the XML that's being styled. In this exercise we're going to see how to do that using CSS. So I'm going to open up the businesscard_style_CSS2 file. Now you can see I've made a couple of changes from the previous business card example. First, I've changed the root tag from business card to business cards, and I did that because I want to have a container that can hold more than one business card. And you can see here I've copied the first business card and pasted it down at the bottom so that there's more than one in the file. Next change I've made is that I've introduced a new attribute called primary for the various phone numbers. So what we're going to do now is write some CSS code that's going to put labels in front of the…

Contents