|
Posted by dorayme on 06/16/07 07:28
In article <hlLci.33393$Um6.5235@newssvr12.news.prodigy.net>,
"Jon Slaughter" <Jon_Slaughter@Hotmail.com> wrote:
> 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
> ....
>
>
> Is there a way to apply a style recursive to it to so that each div is given
> the same style? What are the pro's and cons of inlining or using class=?
>
> 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?
>
Extraordinary thinking and speaking. "Hypothetical structure",
"in reality", arbitrary nestings", "a way to apply a style
recursive to it" (without it even being clear what the "it"
refers to)...
The pro of a class is that you state a rule once and it refers to
whatever falls under it in the html, the pro of an inline is that
it is easier if it is a one off for a particular bit in the html.
If you want all the divs to be be styled the same, you don't even
need to class anything. div {color: red;] will make all the text
in all the divs red unless you do something else to stop this. In
fact, if you want a whole lot of things in a div to be the same,
you do this and just class or inline the exceptions.
--
dorayme
Navigation:
[Reply to this message]
|