Webmaster Forums 101 - Free Help and Discussions
 
 
 

MEMBER REWARDS - Earn free advertising by participating in these forums! Click here for details.

Welcome to Webmaster Forums 101!

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th April 2005, 10:00 AM   #1
Peter Sinclair's Avatar

Username: Peter Sinclair
Rank: Super Moderator
Join Date: Jan 2005
Location: Australia
Posts: 282
Points: 14.18
Unhappy CSS & Linking Problems

I'm trying to change the link colors of one set of links on a page but their color etc is still set to the default link settings. Here's my code:

HTML Code:
.red_links a { color: red; text-decoration:underline; }
HTML Code:
<div class="redlinks"> <a href="pagetext.html">Test page</a><br> <a href="pagetext.html">Test page</a><br> <a href="pagetext.html">Test page</a><br> <a href="pagetext.html">Test page</a><br> </div>

Even though I've got all that the links still revert back to this coloring:

HTML Code:
a:link,a:active,a:visited{ color:blue; text-decoration:none } a:hover{ color:blue; text-decoration:underline }

Any ideas how I can do this without having to put a class="style" on every <a> tag?
__________________
Peter Sinclair
http://www.motivationalmemo.com/
Motivational author and speaker, has created many powerful motivational tools that have been designed to empower your life. Thousands have already benefited from his books and ezines. And as Peter says, "When life requests an answer, shout 'YES!'"

Australia Website Designers
Peter Sinclair is offline   Reply With Quote
Old 27th April 2005, 06:54 PM   #2
viper's Avatar

Username: viper
Rank: WF101 Fanatic
Join Date: Apr 2003
Location: Canada
Posts: 172
Points: 28.21
Default

Hi peter well im not much of a css expert but i think the line

Code:
<div class="redlinks">

should be

Code:
<div class="red_links">

notice the underscore it should match the class name you chose for your links ive never done links that way before i always define the class in the hyperlink tag itself not in a div but the fix might work.

Hope this helps

Dave
__________________
viper is offline   Reply With Quote
Old 28th April 2005, 09:35 AM   #3
Mr. Tech's Avatar

Username: Mr. Tech
Rank: Problem Solver
Join Date: Dec 2004
Location: Gold Coast, Australia
Posts: 2,166
Points: 1,025.61
Send a message via MSN to Mr. Tech
Default

You're right Dave. Looks like peter hasn't matched the class with the div. That wouldn't help
__________________
Please read the Forum Rules

Get rewarded for posting
- free advertising!

.::. [ Webmaster Resources ] .::. [ Web Design ] .::. [ Developer Tutorials ] .::.
Mr. Tech is offline   Reply With Quote
Old 28th April 2005, 09:48 AM   #4
Peter Sinclair's Avatar

Username: Peter Sinclair
Rank: Super Moderator
Join Date: Jan 2005
Location: Australia
Posts: 282
Points: 14.18
Default

Yes, that was a big mistake.

I've fixed it and it's still not working... Any ideas?
__________________
Peter Sinclair
http://www.motivationalmemo.com/
Motivational author and speaker, has created many powerful motivational tools that have been designed to empower your life. Thousands have already benefited from his books and ezines. And as Peter says, "When life requests an answer, shout 'YES!'"

Australia Website Designers
Peter Sinclair is offline   Reply With Quote
Old 28th April 2005, 11:09 AM   #5
viper's Avatar

Username: viper
Rank: WF101 Fanatic
Join Date: Apr 2003
Location: Canada
Posts: 172
Points: 28.21
Default

Hi sorry peter i tried to get it to work to the only way icould get it to work wasto put the class in the hyperlink tags themselfs what you might have to do is div id's instead of div classes to get that to work but that's beond my css knowledge right now maybee ben knows how to set up the css for div id's sorry it didn't work im still learning the whole css and xhtml stuff myself lol so not very good at it yet.

Thanks

Dave
__________________
viper is offline   Reply With Quote
Old 28th April 2005, 12:36 PM   #6
Mr. Tech's Avatar

Username: Mr. Tech
Rank: Problem Solver
Join Date: Dec 2004
Location: Gold Coast, Australia
Posts: 2,166
Points: 1,025.61
Send a message via MSN to Mr. Tech
Default

Peter, try putting this at the top of your CSS. It might be interfering:

Code:
a:link,a:active,a:visited{ color:blue; text-decoration:none } a:hover{ color:blue; text-decoration:underline }
__________________
Please read the Forum Rules

Get rewarded for posting
- free advertising!

.::. [ Webmaster Resources ] .::. [ Web Design ] .::. [ Developer Tutorials ] .::.
Mr. Tech is offline   Reply With Quote
Old 28th April 2005, 04:17 PM   #7
Peter Sinclair's Avatar

Username: Peter Sinclair
Rank: Super Moderator
Join Date: Jan 2005
Location: Australia
Posts: 282
Points: 14.18
Default

That did the trick! Thanks buddy!
__________________
Peter Sinclair
http://www.motivationalmemo.com/
Motivational author and speaker, has created many powerful motivational tools that have been designed to empower your life. Thousands have already benefited from his books and ezines. And as Peter says, "When life requests an answer, shout 'YES!'"

Australia Website Designers
Peter Sinclair is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Forum Jump

Login
User Name
Password


Featured Members


Featured Links


Useful Resources
Webmaster Resources
Developers Tools
Developer Tutorials


Partners

All times are GMT +10. The time now is 06:19 AM.


Powered by vBulletin Version 3.5.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.3.2
 
 
WEBMASTER FORUMS 101
ARCHIVE
CONTACT US
TOP
   
© Webmaster Forums 101 2005. All Rights Reserved.
Design by: vBCore