> On Nov 8, 2013, at 1:56 AM, Philip TAYLOR <chaa...@gmail.com> wrote: > > > > Karl DeSaulniers wrote: > >> Ah I see. Well normally you wouldn't put an ID on the body anyways, you >> would put a class wouldn't you? That is if your trying to style it. > > Personally I would not (recommend a class in preference to an ID > in order to apply styling to the <BODY> element, that is). > > The normal reason for choosing a class in preference to an ID is > to allow that class to be shared amongst multiple elements. Since > there is (by definition) exactly one <BODY> element, and since it > is highly unlikely that any other element should be styled > identically to the <BODY> element (in all aspects, that is, > not just in some aspects such as the choice of font-family), > then I would have thought that an ID was to be preferred so > that one can ensure that it is not accidentally applied to > another element. > > Philip Taylor
Well I agree to a point but actually there isn't always only one body element on a page. When loading say an HTML file into a table or a div or an iframe on a page or inside the inspect element window (evidently), but still even with that said I believe a developer should identify the body class with a naming convention that denotes that class would only be used on a body element and no other. Despite who works on the file after them. For eg: .bodyClass {} Or .bodyStyle {} But we are talking about the page's body Id changing by the browser in the inspect element pane right? Safari loading a mobile safari page inside a template HTML? 2 separate body tags? Hence the I'd change? Best, Karl Sent from losPhone ______________________________________________________________________ css-discuss [css-d@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/