 |
CSS Cascading Style Sheets All issues relating to Cascading Style Sheets (CSS). |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the CSS Cascading Style Sheets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|

December 3rd, 2004, 08:27 AM
|
Authorized User
|
|
Join Date: Nov 2004
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
hyperlinks style
Can anyone list for me some hypelinks style so that i can show it on my website plzz?
thanx for ur help.
|

December 3rd, 2004, 09:06 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
|
|
|

January 1st, 2005, 09:32 AM
|
Authorized User
|
|
Join Date: Sep 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
You can use all the style attribute with Hyper links by specifying as follows:
A.link
{
......
}
A.vlink
{
....
}
A.alink
{
....
}
A.hover
{
....
}
|

January 12th, 2005, 10:56 PM
|
Authorized User
|
|
Join Date: Aug 2004
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
A:link used for showing what will happen with <a>
A:hover user for showing what will happen with <a> when a mouse across it
A:active used for showing what will happen with <a> after clicked (active)
A:visited used for showing what will happen with <a> after visited
|

January 13th, 2005, 03:09 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
|
|
Also just noticed that this last example doesn't follow the LoVe HAte mnuemonic device. These pseudo-classes must appear in a particular order in the style sheet because of both what they do and the cascade. A style for an unvisited link using the :link pseudo class comes first, followed by the style for visited links (:visited), this must be followed by the :hover pseudo, which in turn must be followed by the :active pseudo.
In the following scenario:
a:link {
color: red;
}
a:visited {
color: orange;
}
a:hover {
color: yellow;
}
a:active {
color: black;
}
Because of the cascade each of the selectors have the same specificity [1]. This ordering of the rules allows all of these colors to be seen when the appropriate event is fired off.
[1] http://www.w3.org/TR/CSS2/cascade.html#specificity
Regards,
Rich
--
[ http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design
|

January 13th, 2005, 03:47 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Shouldn't that be LoVe For HAte to accommodate for the (barely supported) :focus pseudo class??
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Butterflies & Hurricanes by Muse (Track 10 from the album: Absolution) What's This?
|
|
 |