Please help! Simple CSS not working.

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Please help! Simple CSS not working.

Post by tecktalkcm0391 »

I can't seem to get the links to change color (to brown) and have no underline until hover....

I've tried both ids and classes.

Code: Select all

#page a:link {text-decoration: none; color:#663300; font-weight:bold;}
#page a:visited {text-decoration: none; color:#663300; font-weight:bold;}
#page a:active {text-decoration: none; color:#663300; font-weight:bold;}
#page a:hover {text-decoration: none; color:#663300; font-weight:bold;}

Code: Select all

<a href="/" class="page" id="page">Home</a>
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Post by tecktalkcm0391 »

Nevermind I got it. Stupid websites that lie.
Its has to be...

Code: Select all

a.page:link {text-decoration: none; color:#663300; font-weight:bold;}
a.page:visited {text-decoration: none; color:#663300; font-weight:bold;}
a.page:active {text-decoration: none; color:#663300; font-weight:bold;}
a.page:hover {text-decoration: none; color:#663300; font-weight:bold;}
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

:lol: Right. Also, more than one element can't have the same id. The id represents one single element.
User avatar
tecktalkcm0391
DevNet Resident
Posts: 1030
Joined: Fri May 26, 2006 9:25 am
Location: Florida

Post by tecktalkcm0391 »

I got one more question...
I have an image with the class of "page" how do I get it to NOT have a border. If I add border:none; nothing happens.
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

Code: Select all

img.page { border: 0px; }
Post Reply