Anthony Papillion II wrote:
> As I interpret it, a class can only be used within the HTML element it is
> linked to (i.e.)
No, this is not correct. A class can be used on any element. Example:
.yadda { color: red; }
This text is red.
This text is red.
This text is red.
The exception to this is
An id can only be used once on a page and is generally used to identify
structural elements ie:
div id="header"
whereas a class can be used multiple times ie:
p class="news"
ul class="itemlist"
...pretty basic stuff, best to get a good css book and study it well.
On 11/05/06, Anthony Papillion
ID's must be unique through the html document.
Classes can be reused on serveral tags
// Sebastian
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Anthony
Papillion II
Sent: 11. maj 2006 22:31
To: CSS Discussion List
Subject: [css-d] Question about
: Thursday, May 11, 2006 3:31 PM
To: CSS Discussion List
Subject: [css-d] Question about ID vs Class
Hello Everyone,
I'm fairly new to CSS and brand new to the list (just joined today). I was
going through a CSS tutorial and came across an subject I'm not sure I fully
understand. I
Hello Everyone,
I'm fairly new to CSS and brand new to the list (just joined today). I was
going through a CSS tutorial and came across an subject I'm not sure I fully
understand. ID vs Class.
As I interpret it, a class can only be used within the HTML element it is
linked to (i.e.) while ID c