|
|
|
|
Thread title: CSS Rollover Help |
|
|
|
|
|
Thread tools
Search this thread
Display Modes
|
|
12-14-2006, 02:57 AM
|
#1
|
Status: Nixism
Join date: Aug 2006
Location: Nix Yorkism
Expertise:
Software:
Posts: 2,147
|
CSS Rollover Help
this is my current code..
HTML Code:
a#home:hover, a#home { background:url(images/homerollover.gif); } { width:55px; }
I dont know why, but the rollover is not working..
|
|
12-14-2006, 03:15 AM
|
#2
|
Status: Non-conformist
Join date: Jul 2005
Location: Canberra, Australia.
Expertise:
Software:
Posts: 1,172
|
You've set the same background image for both states. You want something like
Code:
a#home {
background: url(images/home.gif); // Or whatever the 'off' state image should be
width: 55px;
}
a#home:hover {
background: url(images/homerollover.gif);
}
EDIT: Corrected typo
|
|
12-14-2006, 03:17 AM
|
#3
|
Status: Nixism
Join date: Aug 2006
Location: Nix Yorkism
Expertise:
Software:
Posts: 2,147
|
|
|
12-14-2006, 03:38 AM
|
#4
|
Status: Non-conformist
Join date: Jul 2005
Location: Canberra, Australia.
Expertise:
Software:
Posts: 1,172
|
Can you post the relevant HTML code for us?
|
|
12-14-2006, 03:59 AM
|
#5
|
Status:
Join date: Dec 2004
Location: California, US
Expertise:
Software:
Posts: 406
|
.amaZe,
Did you fix jono1's typo in a#home:hover (backgroudn -> background) before trying out the code?
Regards,
Patrick
|
|
12-14-2006, 04:01 AM
|
#6
|
Status: Waving
Join date: Aug 2005
Location:
Expertise:
Software:
Posts: 2,694
|
Originally Posted by jono1
You've set the same background image for both states. You want something like
Code:
a#home {
background: url(images/home.gif); // Or whatever the 'off' state image should be
width: 55px;
}
a#home:hover {
backgroudn: url(images/homerollover.gif);
}
|
Jono1, in your code the a#home:hover, has background spelt wrong.
|
|
12-14-2006, 04:16 AM
|
#7
|
Status: Non-conformist
Join date: Jul 2005
Location: Canberra, Australia.
Expertise:
Software:
Posts: 1,172
|
Oops. Always get that one wrong. Comes from sitting in front of a computer answering support queries for 3 hours straight I guess . I've corrected the typo now.
|
|
12-14-2006, 04:18 AM
|
#8
|
Status:
Join date: Dec 2004
Location: California, US
Expertise:
Software:
Posts: 406
|
Originally Posted by Garrett
Jono1, in your code the a#home:hover, has background spelt wrong.
|
lol, is there an echo?
Regards,
Patrick
|
|
12-14-2006, 09:03 PM
|
#9
|
Status: Nixism
Join date: Aug 2006
Location: Nix Yorkism
Expertise:
Software:
Posts: 2,147
|
yes, when I replaced the image. i saw the misspelled word.. but it still doesnt work
|
|
12-14-2006, 09:09 PM
|
#10
|
Status: Pastafarian
Join date: May 2006
Location: Duct Taped to your Ceiling
Expertise:
Software:
Posts: 3,440
|
First off, the links should be in a list. Second, to display correctly, you'll probably want to use display:block on the a:link rather than the <li> (IE issues avoided thus).
I'm not sure why you've got a#home, unless you are trying to apply a hover state to a <div> or something, in which case you are going about it wrong, plus IE doesn't support pseudo :hover. But since I don't think this is the case I'll shut up.
|
|
|
|
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|