First of all - next time PLEASE choose a subject that deals with what
you want to know, not what you are. Nobody will look up the archives
for "newb", but people might look for "why do people set styles on
body and HTML"... This list has posting guidelines and they do make a
lot of sense.

> If I'm using divs with IDs for layout, is there any reason to use one or
> the other convention in my stylesheet?
>
> div#content {...
>
> #content {...

The former explains that it is a DIV and not an other element with
this ID. It might help spotting which selectors deal with layout,
however a proper CSS structure and commenting is better for that. As
an ID is unique to the document, it really is not much of a
difference. Classes are a different issue, as they can be applied to
anything, which is why li.active and a.active can be totally different
settings.

>
> When specifying margins of 0 width, is one or the other of the following
> better for any reason?
>
> margin: 12px 0 5px 0;
>
> margin: 12px 0px 5px 0px;

When you use 0 as the value you don't need the unit, and it might make
it more obvious that there is no margin set for this element.

> What is the reason I see in some stylesheets for applying the same styles
> to both 'body' and 'html' elements?  I guess I don't understand the need
> for the 'html'.

That is normallly a hack to achieve "100% high" layouts positioning
footers at the bottom of the viewport even when there is not enough
content.
http://www.alistapart.com/articles/footers

--
Chris Heilmann
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/
Binaries: http://www.onlinetools.org/
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to