Welcome to WebmasterWorld Guest from 3.228.24.192

Forum Moderators: not2easy

Message Too Old, No Replies

div named more than once

     
7:27 pm on Apr 21, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 11, 2004
posts:71
votes: 0


why carnt i name a div more than once in xhtml 1.1 strict
7:40 pm on Apr 21, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 29, 2003
posts:1676
votes: 0


You can't name an id more than once. You can go crazy with classes.

Example:
<div id="unique-div">
Once per page.
</div>

<div class="not-unique-div">
As many times as you want per page.
</div>

7:43 pm on Apr 21, 2004 (gmt 0)

Full Member

10+ Year Member

joined:Dec 10, 2001
posts:254
votes: 0


What exactly do you mean?

Are you referring to using the same name? (I assume you mean "class" or "id".) in several div's. Or are you trying to name the same div multiple times?

[edited by: bruhaha at 7:43 pm (utc) on April 21, 2004]

7:43 pm on Apr 21, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 11, 2004
posts:71
votes: 0


thanks