Re: css recursion
am 16.06.2007 09:22:33 von Adrienne Boswell
Gazing into my crystal ball I observed "Jon Slaughter"
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)
>
>
>
>
> 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 */
This div is gray and
does not use an external stylesheet so is harder to maintain
>
> 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