Solved

CSS - text-decoration: underline

Posted on 2004-08-01
5
4,751 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Html test in IIS 4 22
Which non-HTML GUI front end to use with Java? 3 24
Create tabs to show divs 9 35
html input 8 42
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
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 how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

809 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