?
Solved

CSS Zen Garden's use of nested <span> tags

Posted on 2006-05-12
2
Medium Priority
?
1,372 Views
Last Modified: 2008-01-09

In the examples on CSS Zen Garden (http://www.csszengarden.com/) I noticed an abundant use of nested <span> tags.  They are between the <h>, <p>, etc tags. What's the reasoning behind this?

Example:
1)  <H3><SPAN>The Road to Enlightenment</SPAN></H3>
2)   <P class=p1><SPAN>Littering a dark and dreary road... </SPAN></P>


0
Comment
Question by:c_swanky
2 Comments
 
LVL 14

Expert Comment

by:nltech
ID: 16671183
from the html source:

This xhtml document is marked up to provide the designer with the maximum possible flexibility.
    There are more classes and extraneous tags than needed, and in a real world situation, it's more
    likely that it would be much leaner.
0
 
LVL 30

Accepted Solution

by:
GrandSchtroumpf earned 500 total points
ID: 16671550
It's typically used because in CSS2, only one background image can be applied to an element.
CSS3 draft allows multiple background images on a single element, but browsers don't support that yet.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses
Course of the Month14 days, 17 hours left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question