Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

   

Reply
 
LinkBack Thread Tools Display Modes
Old 10-22-2004, 06:41 AM   #1 (permalink)
Contributing Member
 
Join Date: 07-11-04
Location: Pakistan
Posts: 288
iTrader: 0 / 0%
Latest Blog:
None

digitman is liked by somebodydigitman is liked by somebodydigitman is liked by somebodydigitman is liked by somebodydigitman is liked by somebody
Send a message via MSN to digitman Send a message via Yahoo to digitman
using different link colors through css

Hi.
I want to use a different link color for different elements on my page. For example I have blue as the background color of my page's header,and I want to use white font color for the links in this area,and a different color for other areas.I'm trying to use classes but they don't work.There's my code from the css file:

Code:
.header { background-image: url(images/tabstrip.gif); background-repeat: repeat-y; text-indent: 5%; } A.header.:visited { color: white }
But I've had no success.If I remove the ".header" part from the above statement it works,but then the color is the same throughout the page.Oh and here's the html code:

Code:
<div class="header"> <a href="index.php">Test link</a> </div>
That's all of the code i've written so far.I'll move on to designing the other elements after I've designed the header..on which I'm stuck right now ..Any thoughts?
Thanks in advance.
digitman is offline  
Add Post to del.icio.us
Reply With Quote
Old 10-22-2004, 08:28 AM   #2 (permalink)
No Longer Here
 
Join Date: 09-27-03
Location: State College, PA
Posts: 9,354
iTrader: 0 / 0%
Latest Blog:
None

Jazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebody
Try this on the ones you want to be white...

<a class="header" href="index.php">Test link</a>
Jazzee is offline  
Add Post to del.icio.us
Reply With Quote
Old 10-22-2004, 04:04 PM   #3 (permalink)
Contributing Member
 
Join Date: 07-11-04
Location: Pakistan
Posts: 288
iTrader: 0 / 0%
Latest Blog:
None

digitman is liked by somebodydigitman is liked by somebodydigitman is liked by somebodydigitman is liked by somebodydigitman is liked by somebody
Send a message via MSN to digitman Send a message via Yahoo to digitman
Hi.
Well..it worked but the word "Test" in the link text didn't have a blue background,and it had a pure white.
digitman is offline  
Add Post to del.icio.us
Reply With Quote
Old 10-22-2004, 05:40 PM   #4 (permalink)
No Longer Here
 
Join Date: 09-27-03
Location: State College, PA
Posts: 9,354
iTrader: 0 / 0%
Latest Blog:
None

Jazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebody
What do you mean?
Jazzee is offline  
Add Post to del.icio.us
Reply With Quote
Old 10-22-2004, 06:18 PM   #5 (permalink)
Contributing Member
 
Join Date: 07-11-04
Location: Pakistan
Posts: 288
iTrader: 0 / 0%
Latest Blog:
None

digitman is liked by somebodydigitman is liked by somebodydigitman is liked by somebodydigitman is liked by somebodydigitman is liked by somebody
Send a message via MSN to digitman Send a message via Yahoo to digitman
nvm.I fixed it now.Thanks for the help
digitman is offline  
Add Post to del.icio.us
Reply With Quote
Old 10-23-2004, 10:59 AM   #6 (permalink)
Moderator
 
LazyJim's Avatar
 
Join Date: 10-13-03
Location: UK
Posts: 2,821
iTrader: 0 / 0%
Latest Blog:
None

LazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to all
Send a message via MSN to LazyJim
You origional CSS should have been a little different, the second block should be changed from ...
Code:
A.header.:visited { color: white }
... to this ...

Code:
.header a { color: white } .header a:visited { color: silver }
The first means all <a> elements inside any element who's class="header" and the second means the same but all <a> links that have been visited.
__________________

-LJ-

My advice is to look at each case individually, with an informed mind and an appropriately balanced and objective viewpoint.

Web Design and Development, Ipswich, UK.
My deviantArt
LazyJim is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
what do think of the colors Australia Banners Graphic Design Forum 21 06-12-2008 06:06 AM
Google Adsense Adlinks Title Link Colors Buskerdoo Contextual Networks 8 07-10-2005 07:07 PM
Colors ... Atom Graphic Design Forum 88 10-30-2004 06:03 AM
Website , Link colors? Phreak Web Design Lobby 3 04-05-2004 07:34 PM
link colors sim Coding Forum 4 03-08-2004 07:55 PM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 03:00 AM.
© Copyright 2008 V7 Inc