Help - Search - Members - Calendar
Full Version: text-decoration not working for me
HTMLHelp Forums > Web Authoring > Cascading Style Sheets
James
If you look at: http://www.boddingtonhhh.com.au/rodeorun.html

You will see that Boddington Lions Rodeo is underline. This is what I want. I had to achieve this using the <u></u> HTML tags.

Why does this CSS not work?:

p.framed {
border: #660000 double 4px;
color: #B50821;
font-weight: 700;
background: #ffffff;
width: 40%;
margin: 5% auto 0 auto;
padding: 0 .2em 2em .2em;
text-align: center;
font-size: 120%;
}

p.framed a:link
{text-decoration: underline;
}


I would be much obliged if any of you can help.

Many thanks, James
pandy
Because you have probably visited the page in question and you have this in your style sheet.

CODE
a:visited    {color:#660000; background: transparent; font-size:100%; font-weight:bold; text-decoration:none;}


Frederiek
You have many CSS declarations for links (a:link, p a:link, p.framed a:link) and others that are not related to this specific issue. The only one that gets affected here is the p a:link.

Besides, you can get rid of the <u></u> pair altogether, as links are underlined by default.
And the order in which to put pseudo-classes is Link, Visited, Hover, Active (easy to remember with: LoVe HAte). See Eric Meyer's Link Specificity article.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.