[thelist] css class vs id

Steve Cook steve.cook at evitbe.com
Fri May 10 08:21:03 CDT 2002


> Bad example, not all browsers understand CSS, and not everybody uses
> browsers that render pages visually.

Nope - but the question asked about the differences between ID and CLASS in
CSS. I picked an example using CSS because the question asked about CSS. And
of course H1 and H2 are better ways of setting up header and subheader but
we could pick hairs all day and never get anywhere.

While we're picking hairs, what's so important about your mail that it's
marked with an "important" flag in my mail program?? That's a particularly
irritating habit on a mailing list. Your message is no more or less
important than any other in this thread.

<tip type="CSS elements">
There are 3 types of basic elements in CSS, block-level, inline and list
elemnets.

Put quickly, block-level elements include paragraphs, headings, tables,
DIV's and BODY etc. They can contain othere elements of any type. In display
they begin a new line and force elements that come after to do the same
(unless one plays with positioning). They can only be children to other
block-level elements.

Inline elements include such things as A, SPAN, IMG, INPUT etc. They do not
force anything to start on a new line and can be children to any other
element.

List item elements are pretty much only LI elements!

</tip>

.steve


----------------------------------
 Cookstour - http://cookstour.org
----------------------------------

> -----Original Message-----
> From: David Dorward [mailto:david at david.us-lot.org]
> Sent: den 10 maj 2002 14:56
> To: thelist at lists.evolt.org
> Subject: Re: [thelist] css class vs id
<SNIP>
>
> Bad example, not all browsers understand CSS, and not everybody uses
> browsers that render pages visually.
>
> <h1>Main title</h1>
>
> and
>
> <h2>Subtitle</h2>
>
> are much better.
>
> <div id="mainmenu">Your menu here</div>
>
> and
>
> <img class="thumbnail" ...>
>
> are possible better examples of id and class.
>
> --
> David Dorward
http://david.us-lot.org/



More information about the thelist mailing list