Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Add non-standard attributes via css?

0 views
Skip to first unread message

Daniel Barisch

unread,
May 26, 2003, 10:16:17 AM5/26/03
to
Is it possible to add non-standard-html-attributes to html-elements with a
css-definition, like

HTML:
<html>
...
<div class="myClass"/>
...
</html>


CSS:
.myClass { myAttribute: myValue; }

???

Thanks,
D.Barisch


José Jeria

unread,
May 26, 2003, 10:27:14 AM5/26/03
to
No

Scott McNair

unread,
Jun 3, 2003, 4:48:03 PM6/3/03
to
"Daniel Barisch" <gobli...@gmx.de> wrote in
news:#dAtqj4I...@TK2MSFTNGP10.phx.gbl:

> Is it possible to add non-standard-html-attributes to html-elements
> with a css-definition

AFAIK, no. But you can assign variables to tags themselves, as such:

<input type=button SecretMessage="Wow, this worked!" value="Click Me"
onclick="alert(this.SecretMessage);this.SecretMessage='This worked
too!';alert(this.SecretMessage)">

It only half-works in Netscape.

You can see a practical use for this at
http://www.mcnair.nu/test/MouseTools/

0 new messages