what i learn't today

wyrd_fish

Fledgling Freddie
Joined
Dec 27, 2003
Messages
537
what i learnt today

in HTML 4.1 (strict) each id* should only be used once... crazy...

this means that you'd have to have the same thing loads of times, if you have simmilar / the same div's your style sheets must be really repetertive

* <div id="id">moo</div>
 

fatbusinessman

Fledgling Freddie
Joined
Dec 22, 2003
Messages
810
Seems to me you're misusing the id attribute. Its purpose is to uniquely identify a particular element.

If you want a load of elements to look the same, you'd want to use the class attribute. Works in much the same way, but it's referenced as element.class instead of element#id in the stylesheet, and you can have loads of elements of the same class.
 

wyrd_fish

Fledgling Freddie
Joined
Dec 27, 2003
Messages
537
I thought class was only used for formatting.

this being a layout and all


ah well
 

fatbusinessman

Fledgling Freddie
Joined
Dec 22, 2003
Messages
810
That's all layout is, really - just a type of formatting which relates to position as well as appearance...
 

L_Plates

Fledgling Freddie
Joined
Dec 22, 2003
Messages
628
wyrd_fish said:
in HTML 4.1 (strict) each id* should only be used once... crazy...

this means that you'd have to have the same thing loads of times, if you have simmilar / the same div's your style sheets must be really repetertive

* <div id="id">moo</div>

Indeed "id" is only meant to be used once as it takes priority over any other class. In the code ;)
 

wyrd_fish

Fledgling Freddie
Joined
Dec 27, 2003
Messages
537
well thats what happens when you manage to teach your self basic CSS layouts from 1 tutorial and a attribute list.
 

Users who are viewing this thread

Top Bottom