Wrox Programmer Forums
|
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
 
Old December 3rd, 2004, 08:27 AM
Authorized User
 
Join Date: Nov 2004
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default hyperlinks style

Can anyone list for me some hypelinks style so that i can show it on my website plzz?




thanx for ur help.

 
Old December 3rd, 2004, 09:06 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Hi, can you make your question more specific? What styles exactly do you need?

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
 
Old January 1st, 2005, 09:32 AM
Authorized User
 
Join Date: Sep 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can use all the style attribute with Hyper links by specifying as follows:
A.link
{
......
}
A.vlink
{
....
}
A.alink
{
....
}
A.hover
{
....
}

 
Old January 1st, 2005, 02:40 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

That won't work. I think you were going for this:

a:link {

}
a:visited {

}
a:hover {

}
a:active {

}


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
 
Old January 12th, 2005, 10:56 PM
Authorized User
 
Join Date: Aug 2004
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

 
Old January 13th, 2005, 11:29 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Quote:
quote:
A:link used for showing what will happen with <a>
Just wanted to point out that a capital 'A' in the style sheet and a lowercase 'a' in the markup may bring unexpected results. Especially if you are going for XHTML compatibility, which is case sensitive and requires lowercase markup. Best to keep it consistent.


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
 
Old January 13th, 2005, 03:09 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

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
 
Old January 13th, 2005, 03:47 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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?
 
Old January 20th, 2005, 09:13 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Ha yes, I belive Gecko is the only one currently supporting :focus on hyperlinks. Opera does not allow a hyperlink to receive focus. IE allows a hyperlink to receive focus, but doesn't support the :focus pseudo. Maybe KHTML supports it as well, but I don't have it in front of me ATM.

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





Similar Threads
Thread Thread Starter Forum Replies Last Post
Hyperlinks stephens1982 HTML Code Clinic 1 August 29th, 2005 12:13 AM
hyperlinks in XSLT, please help. figit XSLT 1 May 6th, 2005 03:06 AM
Hyperlinks bahachin Excel VBA 2 February 13th, 2005 04:50 AM
hyperlinks sbhandar Classic ASP Basics 4 August 19th, 2004 09:17 AM
difference between style.visibility and style.disp Mimi Javascript How-To 6 September 17th, 2003 11:50 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.