You are here: Re: CSS inheritence - Maybe Easy « HTML « IT news, forums, messages
Re: CSS inheritence - Maybe Easy

Posted by Joe on 11/26/07 11:55

In article <rQODg.3165$r61.2003@text.news.blueyonder.co.uk>, dave1900
@blueyonder.co.uk says...
>
> "dorayme" <doraymeRidThis@optusnet.com.au> wrote in message
> news:doraymeRidThis->
> > .example1 {color:red}
> > .example2 {font-size:500%;}
> >
> > <p class="example1">This should be red and normal in size</p>
> > <p class="example2">This should be just enormous in size</p>
> > <p class="example1 example2">This should red and enormous in
> > size</p>
>
>
> Hmmm, OK, I guess that's the way to do it then. I was kind of hoping there
> was a way to do it so that within the HTML code one only had to define a
> single class, so using your example
> <p class="example1 example2">This should red and enormous in size</p>
> would become:
> <p class="example2">This should red and enormous in size</p>
>
> but in the style sheet itself we define that example2 always inherits
> example1 (so therefore we don't have to list two or more styles within an
> element).
>
> I thought there would have been a way to do this but I'm sure there is a
> logical reason as to why not.
>
> Thanks for the advice.
>
>
.example1, example2 {color:red;}
..example2 {font-size:500%;}

<p class="example1">This is red text</p>
<p class="example2">This is enormous red text</p>

 

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

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