[thelist] CSS Problem

Sarah Sweeney mr.sanders at designshift.com
Wed Dec 8 11:14:21 CST 2004


> I've got a CSS problem I can't figure out, and I'm having a hard time
> finding anything on google or CSS reference, because I can't find an example
> for what I need to do. What I want is the class "sidetitle" to a different
> color in two separate divs that share the same class. Below is the code. In
> the div with the class "links1", I want all the sidetitle classes to be
> white. In div with class "links2", I want all the sidetitle classes to be
> blue.
> 
> <div id="links1">
> 	<div class="sidetitle">Archives</div>
> 	<div class="side">
> 		December 2004<br />
> 		November 2004
> 	</div>
> </div>
> 
> ~~~~~~~~~~~~~~~~~~
> 
> <div id="links2">
> 	<div class="sidetitle">Categories</div>
> 	<div class="side">
> 		Books<br>
> 		Funny Stuff<br>
> 		Pets<br>
> 	</div>
> </div>

Try this:

div#links1 div.sidetitle { color: white; }
div#links2 div.sidetitle { color: blue; }

-- 
Sarah Sweeney  ::  Web Developer & Programmer
Portfolio  ::  http://sarah.designshift.com
Blog  ::  http://hardedge.ca


More information about the thelist mailing list