Solved

CSS - text-decoration: underline

Posted on 2004-08-01
5
4,736 Views
Last Modified: 2012-08-13
Is it possible to set text-decoration underline underline styles?

e.g. like double underline or even double accounting or single accounting ones?
0
Comment
Question by:ycomp
  • 2
  • 2
5 Comments
 
LVL 36

Accepted Solution

by:
Zyloch earned 500 total points
ID: 11688942
For Mozilla browsers, you can set a double underline with nested <span> tags:

<span style="text-decoration:underline;"><span style="text-decoration:underline;vertical-align:4px;">Your text</span></span>

This will not work on IE, unfortunately, so you can use an IE-hack and set border-bottom to double like this:

<span style="text-decoration:underline;_text-decoration:none;"><span style="text-decoration:underline;vertical-align:4px;_text-decoration:none;_border-bottom:3px double;">Your text</span></span>

The _ before the style means IE-only (as of now at least)

I'm not sure what you mean by double accounting and single accounting, though...

Regards,
${Zyloch?
0
 

Author Comment

by:ycomp
ID: 11689024
thanks Zyloch.

I'm sure if double underline is not natively supported by CSS then double and single accounting underline (like in Excel) is not natively supported either.
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 11689977
Hmmm, if I may - a lot of unecessary code and IE only hacks there :-(

<span style="border-bottom: double red;">Your text</span>

or for links

a.special
{
border-bottom: double red;
}

<a href="" class="special">Your text</a>
0
 

Author Comment

by:ycomp
ID: 11691178
cool sean, your code will come in useful.
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 11691185
Yah, some unnecessary code, but I was just showing all the ways to do it :)
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
This article discusses four methods for overlaying images in a container on a web page
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now