Sue Sims wrote:[color=blue]
> On 17 Nov 2003 17:28:19 GMT, Eric Bohlman <ebohlman@earthlink.net> wrote:
>[color=green]
>> Actually, the universal selector there simply means that it doesn't
>> matter
>> what element *type* has the particular ID; it could be a <p>, or a <div>,
>> or what have you. The selector refers to any element with that ID. The
>> fact that only one *element* in a document can have a particular idea
>> doesn't imply that only one *element type* can have it. It could be an
>> element of any type; there just can't be two or more such elements in the
>> same document.[/color]
>
>
> It seemed to me that using the universal selector in that test case
> would encourage re-use of the ID, which is not "allowed".
>
> At any rate, I'm wondering whether any UA does not allow this re-use?
> I've put up a TC here <URL:
http://css.nu/examples/1692.html > which
> re-uses the markup in the W3C example on duplicated elements, and would
> appreciate input. Is this how the UA is supposed to render the markup?
> If so, why?
>
> Sue "trying to clean out old bugs from the Opera bug tracking system" Sims[/color]
An ID can also be used to be pointed at like this:
<a href="#blah">blah</a>
<h1> id="blah">blah</a>
An ID can also be used to be reached with javascript
:
document.getElementById('blah').style.backgroundCo lor = "green";
Therefore it also must be unique. If you don't want all that. And just
want 2 elements be styled the same use the class attribute, which is
also allowed on almost all elements.
--
Anne van Kesteren
<http://www.annevankesteren.nl/>