...

View Full Version : Span of text with a background color not underlined when part of a link



dlg0351
12-13-2010, 03:30 PM
If this has been covered before I apologize.

I want the search-term span to be underlined since it is part of a link but not underlined when it isn't part of a link.



#search-results a {
text-decoration: underline;
}

.search-term {
background-color: yellow;
}

<div id="search-results">
<p><a href="#"><span class="search-term">Lorem</span> ipsum</a><br />
Donec iaculis, urna et gravida lacinia, nunc turpis cursus <span class="search-term">lorem</span>, sit amet hendrerit odio dui eget dolor.</p>
</div>

abduraooft
12-13-2010, 03:35 PM
#search-results a, #search-results a span {
text-decoration: underline;
} ?

dlg0351
12-13-2010, 03:51 PM
You rock! I was drawing a blank, thanks so much!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum