Solved

CSS text-decoration:none;  and vice versa problems

Posted on 2003-11-19
2
1,839 Views
Last Modified: 2006-11-17
Hi,
I have been struggling with my css. What I want is a link within the text class to be white normally with no underline, then underline when it is hovered over. I thought I knew how to do this, but it seems not.
I'f i remove ".text {font-family:arial;font-size:11px;vertical-align: middle;text-decoration:none;color:#FFFFFF;}" then there is no formatting to the text class

if I remove "text-decoration:none;" from that line then it is always underlined
if I have it as it is then it is never underlined.

Can anyone explain why?

<style type="text/css">
.textheading {font-family:arial;font-size:11px;color:#24599C;font-weight:bold;text-align:left;}
.text {font-family:arial;font-size:11px;vertical-align: middle;text-decoration:none;color:#FFFFFF;}
.texta {font-family:arial;font-size:11px;color:#FFFFFF;font-weight:bold;vertical-align: middle;text-align:center;}
.texttop {font-family:arial;font-size:16px;color:#FFFFFF;text-align:right;vertical-align: text-bottom;}
.texthelp {font-family:arial;font-size:11px;color:#FFFFFF;text-decoration:none;}
a.texthelp:active{color:#FFFFFF;}
a.texthelp:visited{color:#FFFFFF;}
a.texthelp:hover{color:#DD8842;}
a.text:active{color:#FFFFFF;text-decoration:none;vertical-align: middle;}
a.text:visited{color:#FFFFFF;text-decoration:none;vertical-align: middle;}
a.text:hover{vertical-align: middle;}
.box {text-align: center;vertical-align: middle;}

</style>


Thanks
H

www.d6online.co.uk
0
Comment
Question by:wjdashwood
2 Comments
 
LVL 17

Accepted Solution

by:
dorward earned 375 total points
ID: 9780391
Sounds like you want to add:

a.text:hover { text-decoration: underline; }
0
 

Author Comment

by:wjdashwood
ID: 9780493
now I feel really silly :>
Thanks for the help
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

828 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