...

View Full Version : Is this right???



gpogs
11-18-2002, 01:01 AM
......is this right???

#style1.a:link { color: green; text-decoration: none; }
#style1.a:active { color: green; text-decoration: none; }
#style1.a:vistied { color: green; text-decoration: none; }
#style1.a:hover {background-color: red; text-decoration: underline;}

#style2.a:link { color: green; text-decoration: none; }
#style2.a:active { color: green; text-decoration: none; }
#style2.a:vistied { color: green; text-decoration: none; }
#style2.a:hover {background-color: red; text-decoration: underline;}


<a id="style1" href="link1.html>LINK1</a>
<a id="style2" href="link2.html>LINK2</a>

Pooh
11-18-2002, 01:16 AM
a#style1:link { color: green; text-decoration: none; }
a#style1:active { color: green; text-decoration: none; }
a#style1:visited { color: green; text-decoration: none; }
a#style1:hover {background-color: red; text-decoration: underline;}


<a id="style1" href="link1.html">LINK1</a>

whammy
11-18-2002, 02:27 AM
If you're concerned about XHTML compatibility, you will want to use classes instead of id's. :)

Pooh
11-18-2002, 03:37 AM
or just use the id selector as intended for a unique markup and you shouldn't have a XHTML problem.

whammy
11-18-2002, 03:39 AM
Pardon my ignorance in this area; but can you provide an example? (assuming by unique you don't mean ONLY one instance of a certain "look"). :)

Otherwise, are not classes the way to go?

gpogs
11-18-2002, 03:56 AM
thx again peeps...all the example above works great!!
:D

..stay tuned for more questions though...im not done:thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum