|  | Posted by Chris F.A. Johnson on 08/21/06 17:24 
On 2006-08-21, Steve Kostecke wrote:> Say I have a <div id="content"> for the main content column, and within
 > that column, I have several items, ie <div class="item"> (each would be
 > some sort of article of sorts.)
 >
 > In the CSS say I have #content { ... }
 >
 > Why is it I cannot have #content.item { ... } as this seems to fail on
 > any browser that I've tried (IE 6, FF 1.5, Moz 1.8b, NS 7, Opera 8), but
 > I do seem to recall that this was possible but I can't find the correct
 > syntax for this particular construct.
 
 You can have that, but it applies to the <div> itself, e.g., with
 this mark-up:
 
 <div id="content" class="item">
 
 If you want it to apply to an element within the <div>, use:
 
 #content item { ... }
 
 --
 Chris F.A. Johnson                      <http://cfaj.freeshell.org>
 ===================================================================
 Author:
 Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
 [Back to original message] |