This is a discussion on "CSS image rollover problems when using hrefs" within the Web Page Design section. This forum, and the thread "CSS image rollover problems when using hrefs are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
CSS image rollover problems when using hrefs
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
CSS image rollover problems when using hrefs
Bit of a newbie as you'll guess. I'm having problems using CSS to control rollover images in IE when associated with hrefs. Using this code:
a.link:link { background:url(assets/on.gif) bottom left no-repeat; } a.link:hover { background:url(assets/off.gif) bottom left no-repeat; } In FF this lets you roll over text, swap an image and link to another page all in one go. However, this doesn't work in IE when the href includes a dot (.) suffix. For instance .com/.co.uk/.html/.pdf. But it does work when you link to something like Skype which has an href of "callto://mark.sk" - see no dot suffix!! Any ideas out there? |
|
|
|
||||
|
Re: CSS image rollover problems when using hrefs
That's odd. Could I have a link, please?
The background switch method might help if you're in a pinch. It's better than using two images anyway: http://www.newguyinennis.com/samples/css_hover/ |
|
||||
|
Re: CSS image rollover problems when using hrefs
I agree with Ryan ... use one image and change the background-position to switch states
Pure CSS rollovers without Javascript |
|
||||
|
Re: CSS image rollover problems when using hrefs
Hoot-Nanny! Wooo!
__________________
I've got <style> and .class
Last edited by moojoo; Mar 8th, 2007 at 21:48. |
|
||||
|
Re: CSS image rollover problems when using hrefs
Silly moojoo, I already promoted your example
|
|
|||
|
Re: CSS image rollover problems when using hrefs
leave him alone he's illiterate and legally blind
Just kidding! |
|
||||
|
Re: CSS image rollover problems when using hrefs
I never learned to read! So um.. Did it help?
__________________
I've got <style> and .class
|
|
|||
|
Re: CSS image rollover problems when using hrefs
Sorry Moojoo, been busy testing the new site. I tried the idea of using the one image and changing it's position but I couldn't make it work, it just kind of stuck open if you like. Instead I used an image just in the Hover state. Partly through being a bit of a CSS novice and having a deadline I had to drop a few 'nice to haves'. But thanks anyway, have kept the info for another time!
|
|
||||
|
Re: CSS image rollover problems when using hrefs
It's not really a nice to have it's a nice-not-to-have-lag-time-when-loading-the-hover-image thing
Have a look at my link - Pure CSS rollovers without Javascript - I have sample code. |
![]() |
| Tags |
| css, href, rollover |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] multiple image rollover not restoring image | snappy | JavaScript Forum | 4 | Nov 5th, 2007 14:38 |
| css rollover problems | danny322 | Web Page Design | 2 | Nov 5th, 2007 11:30 |
| Rollover image with links on new image | stoob | JavaScript Forum | 2 | Feb 8th, 2007 22:05 |
| Intermittent rollover problems | artdog | Flash & Multimedia Forum | 3 | Sep 11th, 2006 13:05 |
| mouse rollover and sound problems | djmichaud | Flash & Multimedia Forum | 8 | Aug 31st, 2006 14:11 |