|
|
#1 (permalink) |
|
Senior Member
Join Date: Sep 2005
Location: Hull
Posts: 206
|
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. |
|
|
|
|
|
#2 (permalink) |
|
Super Moderator
Join Date: Apr 2006
Posts: 507
|
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)
__________________
Alex Monaghan - Monaghan Consultants Ltd IT & Database consultancy Become Legal - Some thoughts about legal software TVR Cars for sale Dancing on Ice - Samantha Mumba |
|
|
|
|
|
#3 (permalink) |
|
Member
Join Date: Feb 2007
Location: Colchester
Posts: 37
|
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
|
|
|
|
|
|
#4 (permalink) |
|
Senior Member
Join Date: Sep 2005
Location: Hull
Posts: 206
|
Thanks for your help guys I really appreciate it.
__________________
Primary Film Focus - free resource site for film based projects, film forum provided. |
|
|
|
|
|
#5 (permalink) |
|
Business Guru
Join Date: Dec 2003
Location: Near Inverness, Highlands, Scotland
Posts: 7,719
|
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;
}
Code:
<ul class="main"> <li>Link</li> <li>Link</li> </ul> Hope that helps.
__________________
SEO specialist |
|
|
|
|
|
#6 (permalink) |
|
Senior Member
Join Date: Sep 2005
Location: Hull
Posts: 206
|
Thats brilliant, thank you Brian for all your help.
__________________
Primary Film Focus - free resource site for film based projects, film forum provided. |
|
|
|