You are here: Re: [CSS] Quickie: Is it possible to have child Class under ID ? « HTML « IT news, forums, messages
Re: [CSS] Quickie: Is it possible to have child Class under ID ?

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)

 

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

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