Reputation: 282
Even though I have set text-decoration to none, an underline is still showing on the h1 element. If you want to see the full css, go here. I am new to css, and this is just an adapted version of some code I found on the internet, sorry if the problem is obvious. If the problem isn't with the bellow code (which is where I think it probably is) then I will add in other relevant code.
You can see the page this is working on here
#pagetop h1 , a:visited
{
display:block;
float:left;
line-height:90px;
color:#FFFFFF;
text-align:left;
font-size:27px;
font-weight:bold;
font-family:Arial, Helvetica, sans-serif;
float:left;
margin-left:23px;
text-decoration:none;
}
Upvotes: 1
Views: 2206
Reputation: 1662
Your CSS selector #pagetop h1 , a:visited
states that you would like to apply those styles to an h1
and also an a
in its visited state.
The comma in your code represents a list of separate selectors rather than a combined selector. In your case you don't need to separately specify the same styles for both the h1
and the a
.
What you want to select is an a
that is a descendant of an h1
within #pagetop
(so that it isn't applied to all h1
s):
#pagetop h1 a { text-decoration: none; }
Upvotes: 0
Reputation: 1490
There is text decoration in your link in the h1 tag. Add this style:
h1 a
{
text-decoration:none;
}
Upvotes: 1