Reply to Re: css recursion

Your name:

Reply:


Posted by Adrienne Boswell on 06/16/07 07:22

Gazing into my crystal ball I observed "Jon Slaughter"
<Jon_Slaughter@Hotmail.com> writing in
news:hlLci.33393$Um6.5235@newssvr12.news.prodigy.net:

> Say I'm giving a hypothetical structure such as(in reality it would be
> more complicated with arbitrary nestings)
>
><div id="PageComments">
> <div>
> Mike Jones - Subject
> <div>
> Jone Smoth - Subject2
> <div>
> Mike Jones - Subject2
> </div>
> </div>
> <div>
> Jeff - Subject3
> </div>
> </div>
> <div>
> Mike Applehaead - Subject is dead3
> </div>
> <div>
> Cable - Subject is dead5
> </div>
></div>
>
>
> Is there a way to apply a style recursive to it to so that each div is
> given the same style?

div {background-color:#fff; color:#000} /* will style any div element */

What are the pro's and cons of inlining or using
> class=?

div.gray {background-color:#c0c0c0; color:#fff} /* will style any div
with the class gray */

<div style="background-color:#c0c0c0; color:#fff}">This div is gray and
does not use an external stylesheet so is harder to maintain</div>

>
> What I'm afraid of is that if I use some type of css recursion that it
> might slow down the browser when it is applying the styles.
>
> Any thoughts?
>

Your example above does not seem like it has semantic structure, it seems
like div soup. It looks like some hierachial structure, so might be more
suited to list markup and/or headings instead of nested divs.

Think about the structure of the page, and then style it accordingly.


--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

[Back to original 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

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