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 September 19th, 2005, 07:15 AM
Registered User
 
Join Date: Sep 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Links - feeling thick!

Hi all

You have a real beginner here. I can't seem to get my head around customising the style for links. I have successfully made all the links this style:

a {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; color:#FFFFFF; text-decoration:none}
a:link:hover {background-color:#FFFFFF; color:#000000; text-decoration:none}
a:active {color:#CCCCCC; text-decoration:none}

but I have no success in specifying that only certain links should have that style. Should the css code be:


a.menu {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; color:#FFFFFF; text-decoration:none}
a.menu:link:hover {background-color:#FFFFFF; color:#000000; text-decoration:none}
a.menu:active {color:#CCCCCC; text-decoration:none}

and the html code for the links that I want shown in this style:

<a id="menu" href="company.html">About Echo</a>

Thanks
Sally in Cape Town

 
Old September 19th, 2005, 07:46 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Hi Sally, you almost have it, but the styles you are specifying are for a class name, not an id name.

So the HTML should be:
<a class="menu" href="company.html">About Echo</a>

To match the CSS selector, a.menu.

HTH!

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 September 19th, 2005, 01:34 PM
Registered User
 
Join Date: Sep 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by richard.york
 Hi Sally, you almost have it, but the styles you are specifying are for a class name, not an id name.
Aha. Thanks so much - it's amazing how little things can bog one down at times!

Cheers
Sally

 
Old September 19th, 2005, 06:30 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

No problem, happy to help out!

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
GUI for a thick client yanis97 Java GUI 0 October 3rd, 2006 09:03 AM
Thick Client Database connection callmrshiva ADO.NET 0 August 28th, 2006 08:36 AM
Loop and Links faberd XSLT 3 March 17th, 2006 08:48 AM
Generate links darkocobe Classic ASP Basics 1 October 15th, 2004 09:18 AM
Issues with Links bmains Forum and Wrox.com Feedback 3 September 6th, 2004 03:15 PM





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