- This topic is empty.
April 13, 2011 at 1:54 am #32333Lockh33dMember
Hi guys, I am fairly new to CSS and I’m having some difficulty that I was hoping someone might be able to shed some light onto.
What I am trying to do is get an empty div which is contained inside another div to change it’s background image when I hover over a few links I have placed beside the empty div. Do I use a class for something like this?
“Image1” link would change the background Image of #emptyDiv to image1.png, “Image2” link would change it to image2.png and so forth.
This is the code I have so far as an example.
Any help is greatly appreciated!
Thanks =)April 13, 2011 at 3:59 pm #51537angusParticipant
width: 600px; /* Whatever you want */
height: 300px; /* Whatever you want */
/*** You could also set any background styling that is common to all the hover backgrounds; for example ***/
background-repeat: none; /* Stops the background image from repeating */
/* Makes the background cover the entire div for browsers that support it (Safari 3+, Any Chrome, IE9+, Opera 10+, Firefox 3.6+ */
/* Import jQuery */
If you want to learn more about the awesome jQuery library, Jeffrey Way had an awesome screencast series on it.
- The forum ‘CSS’ is closed to new topics and replies.