473,491 Members | 2,221 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

HyperLink underline, how?

hey

asp.net 2.0

I have a HyperLink control on my webpage, I want this HyperLink to display a
underline when mouse is hovering over it. This is NOT a html link, but a
System.Web.UI.WebControls.HyperLink

This is my CSS (which I use to set font size and remove the underline, but
when mouse are hovering I want the link to display a underline):
..level0
{
font-size:small;
text-decoration:none;
color:Black;
}

This is my HyperLink:
<asp:HyperLink ID="hlTag0" runat="server"></asp:HyperLink>

I tryed this CSS class but don't generate a underline
..level0:hover
{
font-size:small;
color:Black;
}

Any suggestions?

Jeff
Aug 11 '06 #1
2 7286
Jeff wrote:
hey

asp.net 2.0

I have a HyperLink control on my webpage, I want this HyperLink to display a
underline when mouse is hovering over it. This is NOT a html link, but a
System.Web.UI.WebControls.HyperLink

This is my CSS (which I use to set font size and remove the underline, but
when mouse are hovering I want the link to display a underline):
.level0
{
font-size:small;
text-decoration:none;
color:Black;
}

This is my HyperLink:
<asp:HyperLink ID="hlTag0" runat="server"></asp:HyperLink>

I tryed this CSS class but don't generate a underline
.level0:hover
{
font-size:small;
color:Black;
}

Any suggestions?

Jeff
What about this:

..level0,
..level0:visited,
..level0:hover
{
font-size:small;
text-decoration:none;
color:Black;
}

..level0:hover
{
text-decoration: underline;
}

Should that not work, then you'll need to view the produced source and
see how exactly the HTML looks like, because :visited and :hover only
apply to links.

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Aug 11 '06 #2
Jeff napisał(a):
hey

asp.net 2.0

I have a HyperLink control on my webpage, I want this HyperLink to display a
underline when mouse is hovering over it. This is NOT a html link, but a
System.Web.UI.WebControls.HyperLink

This is my CSS (which I use to set font size and remove the underline, but
when mouse are hovering I want the link to display a underline):
.level0
{
font-size:small;
text-decoration:none;
color:Black;
}

This is my HyperLink:
<asp:HyperLink ID="hlTag0" runat="server"></asp:HyperLink>

I tryed this CSS class but don't generate a underline
.level0:hover
{
font-size:small;
color:Black;
}

Any suggestions?
What borwser do you use? If it's IE - don't be surprised:) IE doesn't
support css well and doesn't understand for example pseudoclass
":hover" on anything else than "a" element.
First try your page in some modern browser (Firefox, Opera,
Safari,Konqueror and so on...). If it works in one of them - it's just
an stupid IE's lack of support of css.
In IE (and of course all newer browsers) try this selector:

a:hover{
//your settigs here
}

of course this will apply to all "a" elements in your page, but you can
modify this selector to be more precise. If links you want to apply this
style to are placed in any element that got id attribute you can change
this selector to:

#id_of_containing_element a:hover{
//yout settings here
}

--
PP
Aug 12 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
6011
by: addi | last post by:
All, I have seen the feature on many sites and would like to implement it for myself as well, where if a mouse is moved over a hyperlink, it gets underlined. For example, in my code, if the...
20
13776
by: Bob | last post by:
Hello, I have an <h1> banner that is white font on black background. I am using CSS to style the banner in white on black. I would like to hyperlink the words, but I want to force the...
4
5259
by: Salad | last post by:
If I create a field as a hyperlink, Access will open the hyperlink if I single click it. Is there a method within the operating system that would tell access to only open the hyperlink if...
4
7502
by: Andreas Meffert | last post by:
Hello, How can I change the Type of a field in a table from Memo to hyperlink? I import a table from Oracle to Access 2003. After that, the field type of some hyperlink-fields is "Memo". How...
3
4188
by: Ken Saganowski | last post by:
Not sure if this is the proper group to post this but its worth a shot: Is there a project property setting that gives hyperlinks and linkButtons the "rollover" effect with underlining? Right...
3
3022
by: | last post by:
Is there a way to REMOVE the underline within the HyperLink button? Thanks Brian
3
2653
by: Philbox | last post by:
Hi, I work in asp.net and i want to copy an hyperlink to the clipboard. If any one can help me? Thanks
2
4711
by: Keith Wilby | last post by:
A2003, XP Pro. I have a text box on a form. The text box is bound to a hyperlink field. I want to use the contents of the text box in code so I'm assigning the contents to a string variable. ...
5
4249
by: Silgd1 | last post by:
Hey All.... I am creating web page using Netbeans 6.0. I use A jspf (java server page fragment) that is included in most of the other pages. There are several hyperlinks on the jspf that...
0
7115
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7154
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7190
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7360
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5451
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4881
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4578
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3086
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3076
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.