Text-decoration does not work

liunx

Guest
Try as I might, I can't get the text link underlines to disappear. They disappear on rollover, but not before rollover. I have text-decoration set to none, but it has no effect!

In my web page:

<p><span id="boxgo"><a target="_blank" href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.URL_is_here.com/">subscribe or unsubscribe</a></span></p>


In my external CSS:

#boxgo
{
text-decoration: none;
font-family: Verdana, Arial, Sans-serif;
font-weight: bold;
color: black;
background-color: #BBB;
padding-right: .5em;
padding-left: .5em;
}


#boxgo a:hover /* when mouse is over link */
{
font-family:Verdana, Arial, Sans-serif;
font-weight:bold;
color: white;
text-decoration: none;
background-color: #666;
}

Thanks for any help!

Steve HTry adding

#boxgo a{
text-decoration: none;
}Thanks! That did it.Wouldn't you want the id of the <a> to be #boxgo instead of the <span>? Just pointing that out..Not exactly, Sanim. He can put as many <a> tags in that SPAN as he wants and they will all inherit the same behavior. It's a preference choice, and it depends on the situation. Best practice would be to remove the SPAN and give the A tag an ID, but only if there's just one link that needs that specific style.
 
Back
Top