Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Double image rollover CSS

Status
Not open for further replies.

Cineno

Programmer
Jul 24, 2006
142
US
I'm trying to make a link have a rollover that changes it's own image, and also changes another one elsewhere on the page.

Much like this:
I viewed the source of that page, and tried it out and got it to work. The only problem is, if I resize the browser window, the position of the 2nd image moves.

Anyone know how I can fix this? What do I have to do to make the 2nd image come up in the same place no matter what the browser window is sized to?

Thanks for any help!
 
Without seeing your code, it's hard to give a tailored answer... but it sounds like you need to add "position: relative" to the container for the second image (or remove it?)...

Hope this helps,
Dan





Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
The demo you refer to has all of the images as position:absolute - they are not within another positioned div and thus should always appear at the same position relative to the page.

Are you doing something different? (Like maybe putting it inside a relatively positioned div?)

Without seeing your actual code, all we can really do is guess though...

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Yes that was it! I was putting into another div that was relative. It's working great now. Thanks so much for the help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top