You are here: CSS nesting... « HTML « IT news, forums, messages
CSS nesting...

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.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация