Search:
Namespaces
Discussions
.NET v1.1
Feedback
anchor link style
Messages
Related Types
This message was discovered on
ASPFriends.com 'aspngclient' list
.
John Tyson
-- Moved from [aspngfreeforall] to [aspngclient] by Marcie Jones <
Click here to reveal e-mail address
> --
Hi,
I'm having a heck of a time making the style of my links perform the way
I want them to.
In my style sheet I have the following:
a:active {color: #000000; text-decoration: underline;}
a:link {color: #000000; text-decoration: underline;}
a:hover {color: #cc0000; text-decoration: none;}
a:visited {color: #000000; text-decoration: underline;}
And these are the html link controls in my .aspx page:
<a id=3D"LnkAbout" href=3D"AboutUs.aspx" runat=3D"server">About Us</a> =
<a
id=3D"LnkLocations" href=3D"Locations.aspx" =
runat=3D"server">Locations</a> <a
id=3D"LnkPatSvcs" href=3D"PatientSvcs.aspx" =
runat=3D"server">Services</a> <a
id=3D"LnkPTtools" href=3D"PT_Tools.aspx" runat=3D"server">Tools</a>
I want the links to be black and underlined except when the user's
cursor hovers over them, when they would appear red and not underlined.
For some reason it seems the a:hover style is not working.
I chose to use html controls for these links because I was not doing
anything programmatically with them required increased functionality. =20
Can anyone help me with this, or show me an alternative way of
accomplishing my desired effects using asp:Hyperlink web control?
Any help is very much appreciated.
Thank you,
John
Reply to this message...
Peter Brunone
John,
If you're viewing this in Netscape (well, 4.x, anyway), you're not going to
see a hover change. For IE, you only need to define the A and A:hover
classes if you just want standard link and hover behavior.
Regards,
Peter
|-----Original Message-----
|From: John Tyson [mailto:
Click here to reveal e-mail address
]
|
|Hi,
|
|I'm having a heck of a time making the style of my links perform the way
|I want them to.
|
|In my style sheet I have the following:
|
|a:active {color: #000000; text-decoration: underline;}
|a:link {color: #000000; text-decoration: underline;}
|a:hover {color: #cc0000; text-decoration: none;}
|a:visited {color: #000000; text-decoration: underline;}
|
|And these are the html link controls in my .aspx page:
|
|<a id=3D"LnkAbout" href=3D"AboutUs.aspx" runat=3D"server">About Us</a> =
|<a
|id=3D"LnkLocations" href=3D"Locations.aspx" =
|runat=3D"server">Locations</a> <a
|id=3D"LnkPatSvcs" href=3D"PatientSvcs.aspx" =
|runat=3D"server">Services</a> <a
|id=3D"LnkPTtools" href=3D"PT_Tools.aspx" runat=3D"server">Tools</a>
|
|I want the links to be black and underlined except when the user's
|cursor hovers over them, when they would appear red and not underlined.
|For some reason it seems the a:hover style is not working.
|
|I chose to use html controls for these links because I was not doing
|anything programmatically with them required increased functionality. =20
|
|Can anyone help me with this, or show me an alternative way of
|accomplishing my desired effects using asp:Hyperlink web control?
|
|Any help is very much appreciated.
|
|Thank you,
|
|John
Reply to this message...
Andy Smith
on the topic of anchor pseudo selectors...
anybody know how to set those styles right on the tag?
like, how would I define a hover color for a link in the style attribute =
of the tag?
__
Andy Smith
Keyboard Jockey #3a7-2.78.1
[Original message clipped]
Reply to this message...
Peter Brunone
I don't know of any way to assign individual hover pseudoclasses with the
style tag -- and the MSDN docs don't seem to indicate any -- but I do know
that you can accomplish the same effect with the onMouseOver and onMouseOut
event handlers.
If you're determined to use :hover, I suppose you could create as many
classes as you have links, and then create a :hover pseudoclass for each
one. Either approach will have basically the same result, though.
-Peter
|-----Original Message-----
|From: Andy Smith [mailto:
Click here to reveal e-mail address
]
|
|on the topic of anchor pseudo selectors...
|
|anybody know how to set those styles right on the tag?
|like, how would I define a hover color for a link in the style
|attribute of the tag?
|
|__
|Andy Smith
|Keyboard Jockey #3a7-2.78.1
|
|
|> -----Original Message-----
|> From: Peter Brunone [mailto:
Click here to reveal e-mail address
]
|>
|> John,
|>
|> If you're viewing this in Netscape (well, 4.x, anyway),
|> you're not going to
|> see a hover change. For IE, you only need to define the A and A:hover
|> classes if you just want standard link and hover behavior.
|>
|> Regards,
|>
|> Peter
|>
|> |-----Original Message-----
|> |From: John Tyson [mailto:
Click here to reveal e-mail address
]
|> |
|> |Hi,
|> |
|> |I'm having a heck of a time making the style of my links
|> perform the way
|> |I want them to.
|> |
|> |In my style sheet I have the following:
|> |
|> |a:active {color: #000000; text-decoration: underline;}
|> |a:link {color: #000000; text-decoration: underline;}
|> |a:hover {color: #cc0000; text-decoration: none;}
|> |a:visited {color: #000000; text-decoration: underline;}
|> |
|> |And these are the html link controls in my .aspx page:
|> |
|> |<a id=3D"LnkAbout" href=3D"AboutUs.aspx"
|> runat=3D"server">About Us</a> =
|> |<a
|> |id=3D"LnkLocations" href=3D"Locations.aspx" =
|> |runat=3D"server">Locations</a> <a
|> |id=3D"LnkPatSvcs" href=3D"PatientSvcs.aspx" =
|> |runat=3D"server">Services</a> <a
|> |id=3D"LnkPTtools" href=3D"PT_Tools.aspx" runat=3D"server">Tools</a>
|> |
|> |I want the links to be black and underlined except when the user's
|> |cursor hovers over them, when they would appear red and not
|> underlined.
|> |For some reason it seems the a:hover style is not working.
|> |
|> |I chose to use html controls for these links because I was not doing
|> |anything programmatically with them required increased
|> functionality. =20
|> |
|> |Can anyone help me with this, or show me an alternative way of
|> |accomplishing my desired effects using asp:Hyperlink web control?
|> |
|> |Any help is very much appreciated.
|> |
|> |Thank you,
|> |
|> |John
|>
Reply to this message...
Will Currie
Just try removing the visited style
-----Original Message-----
From: Peter Brunone [mailto:
Click here to reveal e-mail address
]
Sent: 11 July 2002 02:06
To: aspngclient
Subject: [aspngclient] RE: anchor link style
I don't know of any way to assign individual hover pseudoclasses
with the
style tag -- and the MSDN docs don't seem to indicate any -- but I do know
that you can accomplish the same effect with the onMouseOver and onMouseOut
event handlers.
If you're determined to use :hover, I suppose you could create as
many
classes as you have links, and then create a :hover pseudoclass for each
one. Either approach will have basically the same result, though.
-Peter
|-----Original Message-----
|From: Andy Smith [mailto:
Click here to reveal e-mail address
]
|
|on the topic of anchor pseudo selectors...
|
|anybody know how to set those styles right on the tag?
|like, how would I define a hover color for a link in the style
|attribute of the tag?
|
|__
|Andy Smith
|Keyboard Jockey #3a7-2.78.1
|
|
|> -----Original Message-----
|> From: Peter Brunone [mailto:
Click here to reveal e-mail address
]
|>
|> John,
|>
|> If you're viewing this in Netscape (well, 4.x, anyway),
|> you're not going to
|> see a hover change. For IE, you only need to define the A and A:hover
|> classes if you just want standard link and hover behavior.
|>
|> Regards,
|>
|> Peter
|>
|> |-----Original Message-----
|> |From: John Tyson [mailto:
Click here to reveal e-mail address
]
|> |
|> |Hi,
|> |
|> |I'm having a heck of a time making the style of my links
|> perform the way
|> |I want them to.
|> |
|> |In my style sheet I have the following:
|> |
|> |a:active {color: #000000; text-decoration: underline;}
|> |a:link {color: #000000; text-decoration: underline;}
|> |a:hover {color: #cc0000; text-decoration: none;}
|> |a:visited {color: #000000; text-decoration: underline;}
|> |
|> |And these are the html link controls in my .aspx page:
|> |
|> |<a id=3D"LnkAbout" href=3D"AboutUs.aspx"
|> runat=3D"server">About Us</a> =
|> |<a
|> |id=3D"LnkLocations" href=3D"Locations.aspx" =
|> |runat=3D"server">Locations</a> <a
|> |id=3D"LnkPatSvcs" href=3D"PatientSvcs.aspx" =
|> |runat=3D"server">Services</a> <a
|> |id=3D"LnkPTtools" href=3D"PT_Tools.aspx" runat=3D"server">Tools</a>
|> |
|> |I want the links to be black and underlined except when the user's
|> |cursor hovers over them, when they would appear red and not
|> underlined.
|> |For some reason it seems the a:hover style is not working.
|> |
|> |I chose to use html controls for these links because I was not doing
|> |anything programmatically with them required increased
|> functionality. =20
|> |
|> |Can anyone help me with this, or show me an alternative way of
|> |accomplishing my desired effects using asp:Hyperlink web control?
|> |
|> |Any help is very much appreciated.
|> |
|> |Thank you,
|> |
|> |John
|>
| [aspngclient] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.aspfriends.com/aspfriends/aspngclient.asp
= JOIN/QUIT
Reply to this message...
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com