Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Inline style rollover text
Old 12-21-2005, 05:10 PM Inline style rollover text
Junior Talker

Posts: 2
Trades: 0
Having trouble getting inline style color attributes to function properly.

<a href="link" style="color: #FFFFFF; link: #FFFFFF; visited: #FFFFFF; hover: #666666; active: #666666">

Makes my linked text the correct color, but doesn't give me the rollover action.

<a href="link" style="link: #FFFFFF; visited: #FFFFFF; hover: #666666; active: #666666">

Gives me the correct rollover action, but not the right link color.

Any thoughts?
smokeyjo is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-21-2005, 05:45 PM
funkdaddu's Avatar
Web Design Snob

Posts: 635
Trades: 0
link, visited, hover and active are selectors not attributes. Do you have to do them inline? Why not just do them in the head? If you want certain styles for certain links, use a class as well:
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

	<head>
		<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
		<title>Untitled Page</title>
		<style type="text/css" media="screen"><!--
a, a:visited, a:link {
	color: #FFFFFF;
}

a:hover, a:active {
	color: #666666;
}

a.blah , a.blah:visited, a:link {
	color: #ff0000;
}

a.blah:hover, a.blah:active {
	color: #0000ff;
}

--></style>
	</head>

	<body bgcolor="#dddddd">
		<p><a href="http://www.google.com">Link 1</a></p>
		<p><a href="http://www.google.com">Link 2</a></p>
		<p><a class="blah" href="http://www.google.com">Link 3</a></p>
	</body>

</html>

Last edited by funkdaddu; 12-21-2005 at 05:47 PM..
funkdaddu is offline
Reply With Quote
View Public Profile Visit funkdaddu's homepage!
 
Old 12-21-2005, 05:57 PM
Junior Talker

Posts: 2
Trades: 0
We'd like to do this inline as it will be used in a CMS and the color of the linked text will need to be changed based on a color scheme dictated by the lead image used.

I've been beating my head, but there has to be a way for this to work.

Thanks for the suggestion, though.
smokeyjo is offline
Reply With Quote
View Public Profile
 
Old 12-21-2005, 08:10 PM
funkdaddu's Avatar
Web Design Snob

Posts: 635
Trades: 0
Can you have a stylesheet for each colors scheme and just change the class for the anchor tags?
funkdaddu is offline
Reply With Quote
View Public Profile Visit funkdaddu's homepage!
 
Reply     « Reply to Inline style rollover text
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13225 seconds with 12 queries