SiteExperts.com Logo Home | Community | Developer's Paradise
User Groups | Site Tools | Site Information | Search
 Main Menu
 Forums
SiteExperts.com Forums
All Discussions

SiteExperts Feedback
The Lounge
Dynamic HTML
Site Design/ Critiques
HTML and CSS
XML Technologies
The Wireless Internet
Internet Explorer
Microsoft .NET
The Server
Technical Support

Sponsored Links

User Groups : Forums : SiteExperts : HTML and CSS :

Previous DiscussionNext Discussion
 Overriding CSS

Hi:  I remember this being discussed in my last HTML class, but now I can't remember the answer:

How do I override an element in CSS?  For example, I have my links fonts appearing as a specific color when using CSS.  In a couple of instances I want to change that color without disabling the CSS attributes for the whole page.  So for these couple of links that I would like to display differently, how do I do that?

Thanks for any assistance.

Started By mcpenn on Sep 5, 2005 at 6:40:11 PM

3 Response(s) | Reply

Earlier Replies | Replies 1 to 3 of 3 | Later Replies
Monte on Sep 5, 2005 at 7:00:32 PM (# 1)

Create two different CSS classes.


MHenke on Sep 6, 2005 at 2:46:40 AM (# 2)

/* generic link rules */
A:link {color:blue;text-decoration:none; ...}
A:visited {...}
A:hover {...}
A:active {...}

/* special link rules */
A.special:link {color:red;text-decoration:underline; ...}
A.special:visited {...}
A.special:hover {...}
A.special:active {...}

<a href="boring.html">A normal link</a>

<a class="special" href="thrilling.jsp">A special link</a>


gvaught on Sep 6, 2005 at 9:32:32 PM (# 3)

Embedded styles entered into the html tag will override css also.


Earlier Replies | Replies 1 to 3 of 3 | Later Replies

To respond to a discussion, you must first logon.

If you are not registered, please register yourself to become a member of the SiteExperts.community.

User Name
Password
Copyright 1997-2004 InsideDHTML.com, LLC. All rights reserved.