Remove Underline From Link Within Hyperlinked Div
I am using the html below
hyperlinked text
the problem i am having is thaSolution 1:
You have a wrong hierarchy there and bad element selection. In your case, the most accurate CSS would be:
a div.logo span.whologo {text-decoration:none;}
But I suggest this approach:
<div class="logo"><a href=""><span class="whologo">hyperlinked text </span></a>
And CSS:
div.logo a {text-decoration:none;}
Or include the span if needed (but only if the span element has underlines, like Hans pointed out in the comment):
div.logo a span.whologo {text-decoration:none;}
Solution 2:
Child items cannot influence their parents using CSS. You need to put an ID or class name on your A
tag, or find something unique up the tree that you can specify for this element.
Solution 3:
Check this out
<style type="text/css">
.linkTst{text-decoration:none;}
</style>
<div class="logo"><a href="" class="linkTst"><span class="whologo">hyperlinked text </span>
</a> </div>
Solution 4:
Put a class on your a tag where you don't want the underline
like this : http://jsfiddle.net/UL8SW/
Solution 5:
First of all: This is not valid html... And you should give your a
a class or id, otherwise this isnt possible with remote css. It is possible with inline css...
Post a Comment for "Remove Underline From Link Within Hyperlinked Div"