Solved

CSS - text-decoration: underline

Posted on 2004-08-01
5
4,753 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
This article discusses four methods for overlaying images in a container on a web page
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…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

756 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