The main advantage of using an ID is simply that it uniquely identifies the element. So your CSS or DOM scripting can target it alone.
------------------ Iain Gardiner http://www.firelightning.com -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Devendra Shrikhande Sent: 09 February 2005 22:27 To: wsg@webstandardsgroup.org Subject: RE: [WSG] Not and IE bug?...follow up difference why a difference between IDs and classes? I thought I should pick up on the comment by Peter and ask one of my many newbie questions... What is the advantage of the fact that IDs must be unique on a page? I am aware of the circumstance that if you need to "repeat" an ID, set is as a class, but have still not figured out the advantage of an ID. Apologies if this question is not appropriate for this list and should be directed more to a CSS-specific list. ¤ devendra ¤ -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Asquith Sent: Wednesday, February 09, 2005 3:12 PM To: wsg@webstandardsgroup.org Subject: Re: [WSG] Not and IE bug?!? Hi Peter Peter Flaschner wrote: > Well, the clearing didn't do it. At least not as I understand it. If you're following the lead of the page you mentioned, you will find removing the overflow: hidden; line from the style sheet should solve your problem. By setting the height to zero and then hiding the overflow you're effectively removing the clearer block from the page layout. Setting visibility to hidden, on the other hand, allows the block to take its specified position and size but not be rendered by the browser. I.e. it still takes up the space it would have. I note, too, that your example page contains multiple elements sharing the same ID. IDs must be unique for a given page. Cheers Peter -- Peter Asquith http://www.wasabicube.com/ ****************************************************** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help ****************************************************** ****************************************************** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help ****************************************************** ****************************************************** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help ******************************************************