I don't know if what I'm trying to do is possible but basically I'm managing my message boards and have some text-decoration issues. I want each A tag to be underlined by default and if there is a SPAN tag in there with the class "_n" then to have the underline dropped inside of the SPAN tag and the rest of the A tag to keep it's underline.
<style type="text/css">
a:link, a:visited, a:active { text-decoration: underline; color: #964242 }
a:hover { color: #C27575; text-decoration:underline }
._n{text-decoration: none;}
</style>
<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.webdeveloper.com/forum/newthread.php?do=newthread&f=7">
<span class="_n">sticky:</span> my thread title
</a>
Basically I want this *points to the top code* to generate the same output as this *points to bottom code*
<style type="text/css">
a:link, a:visited, a:active { text-decoration: underline; color: #964242 }
a:hover { color: #C27575; text-decoration:underline }
</style>
sticky:
<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.webdeveloper.com/forum/newthread.php?do=newthread&f=7">
my thread title
</a>
I can only mess with the class "_n" and nothing else, so I can't simply change the HTML code or anything...
For some reason text-decoration: none; doesn't work within another tag that has text-decoration: underline; that is my issue.
Is there some kind of way to make the class "_n" invisible to it's parent's underline? I only want the underline to start after the class "_n"
I've tried all kinds of z-index position absolute left: inherit; top: inherit; kinda stuff but no luck....
Is this possible? thanksIts best not use the _ underscore for a class name."_n" is a legal class name and unrelated to my issue.
Is what I'm trying to do possible? I take it your answer would be no.Hi !!!!
I don't know if I can help you, but...
If I understood you well, you want something like :
this is your link but this is your span and this is your link again
try that :
<style type="text/css">
a:link, a:visited, a:active { text-decoration: underline; color: #964242 }
a:hover { color: #C27575; text-decoration:underline }
._n{text-decoration: none;}
a span._n {text-decoration: none;}
span._n {text-decoration:none;}
</style>
maybe only one will suffice. With IE, you'll probably need both. I haevn't checked it, but it should work. if it doesn't, try adding that :
a:link span._n, a:visited span._n, a:active span._n, a:hover span._n {
text-decoration : none;
}
I add a similar issue with my css a while ago, and even if it was working fine in FF, I needed some roundabouts for IE...Hi !!!!
I don't know if I can help you, but...
If I understood you well, you want something like :
this is your link but this is your span and this is your link again
That is correct, you understand me well but your answer didn't do the trick -- which happens to be one of the methods that I have tried earlier but failed.
Like I said before. I don't even know if it's possible. Is it?maybe just "a span._n"?doesn't work. If I put color: royalblue; in there then it changes the segment's color
but the segment doesn't lose it's underline with text-decoration: none;what browser are you trying it in?I'm trying it in both IE and Firefox and no luck:
<style type="text/css">
a:link, a:visited, a:active { text-decoration: underline; color: #964242 }
a:hover { color: #C27575; text-decoration:underline }
a span._n{text-decoration:none}
</style>
<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.yahoo.com">
underline<span class="_n"> none </span>underline
</a>
<style type="text/css">
a:link, a:visited, a:active { text-decoration: underline; color: #964242 }
a:hover { color: #C27575; text-decoration:underline }
._n{text-decoration: none;}
</style>
<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.webdeveloper.com/forum/newthread.php?do=newthread&f=7">
<span class="_n">sticky:</span> my thread title
</a>
Basically I want this *points to the top code* to generate the same output as this *points to bottom code*
<style type="text/css">
a:link, a:visited, a:active { text-decoration: underline; color: #964242 }
a:hover { color: #C27575; text-decoration:underline }
</style>
sticky:
<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.webdeveloper.com/forum/newthread.php?do=newthread&f=7">
my thread title
</a>
I can only mess with the class "_n" and nothing else, so I can't simply change the HTML code or anything...
For some reason text-decoration: none; doesn't work within another tag that has text-decoration: underline; that is my issue.
Is there some kind of way to make the class "_n" invisible to it's parent's underline? I only want the underline to start after the class "_n"
I've tried all kinds of z-index position absolute left: inherit; top: inherit; kinda stuff but no luck....
Is this possible? thanksIts best not use the _ underscore for a class name."_n" is a legal class name and unrelated to my issue.
Is what I'm trying to do possible? I take it your answer would be no.Hi !!!!
I don't know if I can help you, but...
If I understood you well, you want something like :
this is your link but this is your span and this is your link again
try that :
<style type="text/css">
a:link, a:visited, a:active { text-decoration: underline; color: #964242 }
a:hover { color: #C27575; text-decoration:underline }
._n{text-decoration: none;}
a span._n {text-decoration: none;}
span._n {text-decoration:none;}
</style>
maybe only one will suffice. With IE, you'll probably need both. I haevn't checked it, but it should work. if it doesn't, try adding that :
a:link span._n, a:visited span._n, a:active span._n, a:hover span._n {
text-decoration : none;
}
I add a similar issue with my css a while ago, and even if it was working fine in FF, I needed some roundabouts for IE...Hi !!!!
I don't know if I can help you, but...
If I understood you well, you want something like :
this is your link but this is your span and this is your link again
That is correct, you understand me well but your answer didn't do the trick -- which happens to be one of the methods that I have tried earlier but failed.
Like I said before. I don't even know if it's possible. Is it?maybe just "a span._n"?doesn't work. If I put color: royalblue; in there then it changes the segment's color
but the segment doesn't lose it's underline with text-decoration: none;what browser are you trying it in?I'm trying it in both IE and Firefox and no luck:
<style type="text/css">
a:link, a:visited, a:active { text-decoration: underline; color: #964242 }
a:hover { color: #C27575; text-decoration:underline }
a span._n{text-decoration:none}
</style>
<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://www.yahoo.com">
underline<span class="_n"> none </span>underline
</a>