Rollover images
-
Hi!
For the last few hours I’ve been trying to get rollover images working on my wordpress site, with 0 effect so far. Which is pretty frustrating…
I’ve been reading some similar topics, and understood that I have to add something like this to my stylesheet: (I added it to my child theme)
.testrollover a { display: block; width: 165px; height: 165px; background: url('http://www.jansweijer.nl/wp-content/uploads/2012/09/IDE_Test.jpg') no-repeat; text-decoration: none; float: left; } .testrollover a:hover { background-position: -165px 0; }And this to the HTML of my page:
<div class="testrollover"><a href="http://www.jansweijer.nl/industrial-design"> </a></div>The image I uploaded is 330 px wide, with on the left 165 pixels my original image, and on the right the image I want to appear on rollover. When I reload my homepage however, only the image link appears (in text) what am I doing wrong?
Thanks in advance!
The topic ‘Rollover images’ is closed to new replies.