Posted by Noozer on 08/10/05 14:20
I have the following CSS classes defined... "result", "row" and "title"
How do I declare each of these in my CSS page so that row and title will
only be applied when within elements with the "result" class?
For example...
<div class="result">
<span class="title">My Example</span>
<span class="row">This is the first row.</span>
<span class="row">
<span class="title">My Subtitle</span>
<p>This text is part of the second row. It should have a title above
it</p>
</span>
</span>
</span>
</div>
Right now, in my CSS file I have...
..results {
background-color: red;
}
..results .row {
display: block;
white-space: nowrap;
}
..results .title {
font-weight: bold;
text-align: center;
background-color: green;
}
....but if I put a "title" span within a "row" span, it doesn't apply the
"title" styling.
[Back to original message]
|