This site is designed for accessibility. Content is obtainable and functional to any browser or Internet device. This site's full visual experience is available in a graphical browser that supports web standards. Please consider upgrading your web browser.
Assume the following markup, which cannot be changed in any way:
<body>
<h1>Hel<strong>lo</strong>
there!</h1>
<p>Welcome to my Web site. I'm
<strong>so</strong> glad
you're here! On this site you can find:
</p>
<ul>
<li><a href="mepics.html">Pictures of
me</a>...
<ul>
<li>...with <a
href="friendpics.html">friends</a></li>
<li>...with <a
href="fampics.html">family</a></li>
<li>...with <a
href="beerpics.html">beer</a></li>
</ul>
</li>
<li><a href="fluffpics.html">Pictures of my cat
Fluffy</a></li>
<li><a href="poetry.html">My
poetry</a>...
<ul>
<li>...written to <a
href="seriouspoetry.html">be
serious</a></li>
<li>...written to <a href="funnypoetry.html">be
funny</a></li>
</ul>
</li>
<li><a href="favlinks.html">My
<em>favorite</em> Web
sites</a></li>
</ul>
<div class="rant">
<p>
The other day someone wrote telling my site was:
</p>
<ul>
<li>lame</li>
<li>stupid</li>
<li>narcissistic</li>
<li><em>really</em> lame</li>
</ul>
<p>
I <strong>hate</strong> that! Why do people do
things like that?
After all, if you don't like the Web site, don't come here.
I'm proud of
<a href="fluffpics.html">my cat</a> and there's
nothing wrong with
naming a mynx Fluffy anyway.
</p>
<p>
So <em>there</em>.
</p>
</div>
<p>
Sorry about that little bit of ranting. I promise to be more
cheerful in the
future. If you want, e-mail me at <a
href="mailto:me@my.web.site">me@my.web.site</a>,
but <em>not</em> if you're going to
complain.
</p>
<p>Have a nice day!</p>
<div class="footer">
All content copyright <a
href="mepics.html">me</a>, on the date I
wrote it.
</div>
</body>
div.rant {border : thin solid #000000;}
This selects any division with a class that contains the word "rant" and gives it a thin solid black border.
div.rant * em {font-style: italic;}
This selects any em element that is a descendant of any element that is a descendant of a division with a class attribute that contains the word "rant". and makes the text italic.
div.rant p + ul > li > em {color :
#ff0000;}
div.rant > ul + p + p > em {text-decoration:
underline;}
This selects any em that is a child of a paragraph that immediately follows (is sibling to) a paragraph that immediately follows (is sibling to) an unordered list that is a child of a division with a class that contains the word "rant" and makes the text underlined.
h1 + p + ul + div.rant + p > a {font-weight:
bold;}
h1 + p + ul + div.rant + p + p {font-weight:
bold;}
This selects any paragraph that immediately follows a paragraph that immediately follows (is sibling to) a division with a class that contains the word "rant" that immediately follows (is sibling to) an unordered list that immediately follows (is sibling to) a paragraph that immediately follows (is sibling to) a heading 1 element and makes it bold.
ul > li > ul li {margin-left: 1.5em;}
This selects any list item that is a descendant of an unordered list that is a child of a list item that is a child of an unordered list element and sets a left margin of 1.5em.
ul > li + li > ul {margin-left: 2em;}
This selects any unordered list that is a child of a list item that immediately follows (is sibling to) a list item that is a child of an unordered list and sets a left margin of 2em.
ul > li > ul > li + li + li > a
{text-transform: uppercase;}
This selects any a element that is a child of a list item that immediately follows (is sibling to) a list item that immediately follows (is sibling to) a list item that is a child of an unordered list that is a child of a list item that is a child of an unordered list and transforms the text to uppercase.
body > ul > li + li {list-style-type:
square;}
This selects any list item that immediately follows a list item that is a child of an unordered list that is a child of a body element and sets the list style type to square.