PDA

View Full Version : Underline with dashed line



helenvale
December 13th, 2003, 15:18
How could I underline a word with a dashed line? Thanks for your help.

bloodyveins
December 15th, 2003, 04:58
try this CSS

add this section to <head>
<style>
<!--
.du {text-decoration: line-through underline}
//-->
</style>

and for the text, add this between them
<span class="du">Underline text with dash</span>

carlito
December 15th, 2003, 06:17
Does that really work?

All I got were links with an underline plus a slash through it?

oh hang on is this mandatory:

and for the text, add this between them
<span class="du">Underline text with dash</span>

?

helenvale
December 16th, 2003, 15:11
Thanks. I will try.

bloodyveins
December 18th, 2003, 05:23
it will work except what she wants is to underline a word like "go-to-earth". it will be more simple, just add "text-decoration: underline" property.

tealeaves
December 28th, 2003, 02:58
no no no. You guys dont understand. I think she means the underline under the link to be dashed. I've also seen this done and would like to know how.

bloodyveins
December 29th, 2003, 05:02
if it is what she means, you must consider the text as block level element since there is no dashed underline in css standard thus enabling this css to work:

<style>
<!--
.dashed { border-bottom: dashed 2px #EDADFX;}
-->
</style>

and try to find what is browser's ouput when you write this html file:

<html>
<head>
<style>
<!--
.dashed { border-bottom: dashed 2px #EDADFX;}
//-->
</style>
<body>
<span class="dashed">
TEsty
</span>
</body>
</html>