Go Back   Internet Business Forums > Design & Development

Reply
 
Thread Tools Display Modes
Old 23-04-2007, 09:09 AM   #1 (permalink)
Senior Member
 
Gary's Avatar
 
Join Date: Sep 2005
Location: Hull
Posts: 206
Default Hover Links

Greetings all

Was wondering if any of you could help I'm having problems with my hover links. I want it to change the background colour of different rows but instead of changing the entire rows colour it only alters the colour behind the link can you help.

current code

a:hover { background-color: silver;}

I've also noticed a lot of pseudo classes don't work why is this?
__________________
Primary Film Focus - free resource site for film based projects, film forum provided.
Gary is offline   Reply With Quote
Old 23-04-2007, 10:15 AM   #2 (permalink)
Super Moderator
 
Join Date: Apr 2006
Posts: 507
Default Re: Hover Links

This will only work on the block you are hovering on (in this case the link).

Try adding a hover for the parent block (you may need a bit javascript help to get this working in IE)
monaghan is offline   Reply With Quote
Old 23-04-2007, 02:03 PM   #3 (permalink)
Member
 
Join Date: Feb 2007
Location: Colchester
Posts: 37
Default Re: Hover Links

Hi, if you could let me know the URL I can have a look.

With a:hover { background-color: silver;} that will effect all the links. If you are wanting to create any effect with CSS on a specific link, the you should look at creating a class such as...

[HTML]

<ul class="list">
<li><a class="first" href="">Hello</a></li>
<li><a class="second" href="">goodbye</a></li>
</ul>

[/HTML]


[CSS]
a.first:hover {
color: #006600;
}
a.second:hover {
color:#000099;
}
[/CSS]

Thats using a "list" tag as well. And it works in FF and IE

Hope this helps
wood1e is offline   Reply With Quote
Old 24-04-2007, 11:19 AM   #4 (permalink)
Senior Member
 
Gary's Avatar
 
Join Date: Sep 2005
Location: Hull
Posts: 206
Default Re: Hover Links

Thanks for your help guys I really appreciate it.
__________________
Primary Film Focus - free resource site for film based projects, film forum provided.
Gary is offline   Reply With Quote
Old 24-04-2007, 04:48 PM   #5 (permalink)
Business Guru
 
Brian Turner's Avatar
 
Join Date: Dec 2003
Location: Near Inverness, Highlands, Scotland
Posts: 7,719
Default Re: Hover Links

Here's a section I use on another site:

Code:
#menu a
{
 display: block;
 width: 130px;
 padding: 0 0 0 10px;
 text-align: left; 
 font-size: 10px;
 color: #000000;
 text-decoration: none;
}

#menu a:hover
{
 background-color: #ddd;

}
Try something like that, though it may require links set up in a list:

Code:
<ul class="main">
<li>Link</li>
<li>Link</li>
</ul>
However, easily modified to avoid lists.

Hope that helps.
__________________
SEO specialist
Brian Turner is offline   Reply With Quote
Old 26-04-2007, 01:28 PM   #6 (permalink)
Senior Member
 
Gary's Avatar
 
Join Date: Sep 2005
Location: Hull
Posts: 206
Default Re: Hover Links

Thats brilliant, thank you Brian for all your help.
__________________
Primary Film Focus - free resource site for film based projects, film forum provided.
Gary is offline   Reply With Quote
Reply

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

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


All times are GMT +1. The time now is 03:34 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.