FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

CSS link coloring

 


WRC Meister
help! i have a blackish site, and wanting all links to be plain white, no underscore, no hover or visited effect, i cant get anything to work, help please? Smile
MaxStirner
WRC Meister wrote:
help! i have a blackish site, and wanting all links to be plain white, no underscore, no hover or visited effect, i cant get anything to work, help please? Smile

You probably need to get acquainted with pseudo-classes. Try this link. The examples use "color" but will of course work with all properties.

Hope it helps (let me know if it didn't)
jmlworld
As you said I think you mean you need white links with no text decoration, hover and visited effects. OK, try this:

Code:

/* Link styles */
a, a:hover, a:visited, a:active{
   color:#fff !important;
   textdecoration:none !important;
}


I used "!important" to overwrite the previous values of the CSS.
ccube921
Ive never learned anything about tags in css like !important, what do they do?
ccube921
Ive never learned anything about tags in css like !important, what do they do?
ccube921
woops sorry bout that just a lil mistake there
Agent ME
I'm pretty sure by default newer or more-specific CSS rules will overwrite the previously set rules. !important is only needed to overwrite rules set later or more specifically. You probably won't need to use it often except maybe as a shortcut in some specific situations.
SamiTheBerber
Agent ME wrote:
I'm pretty sure by default newer or more-specific CSS rules will overwrite the previously set rules. !important is only needed to overwrite rules set later or more specifically. You probably won't need to use it often except maybe as a shortcut in some specific situations.

In other word, !important sets rule to be final.
sonam
Quote:
In other word, !important sets rule to be final.


Yes and no. !important are command for FF and other browsers but IE don't accept it. For example this is very usefull in menu when you want define submenu.

Code:
ul#mojmenu li {
position : relative;
display : block !important; // this define FF and other browsers
display : inline; // this define IE
}


Sonam
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.