View Full Version : On rollover, text appears underneath pic...

02-01-2012, 04:27 PM
Hi there,

Hoping someone has a moment to help me! I'm still such a novice, but each time I ask you guys something, you always teach me a lot.

I have a page where there are three separate rollover images. On rollover, I'd like text to appear underneath the respective image.

At the moment, I'm using span a class and alternating between display:none and display:block.

My problem is that with this being absolutely positioned, the text always appears at the same point on the left.

Is there a simple way to have the text position under the image?

Here's the page link... http://www.rlgphotography.co.uk/gallery.html

Thanks so much!

Emma :)

02-01-2012, 05:39 PM
Think I've solved it - just added <span style=" and adjusted the left position. Does that sound right??!!

Emma :)

02-01-2012, 11:19 PM
Actually, I still have a problem...

Something I haven't been able to get my head round is positioning something 'absolutely'. It's all well and good until you change the page size.

Is there a way of positioning elements absolutely, but in relation to the body area?



02-02-2012, 05:37 PM
Hello emu_robot,
You can position an element relative to it's container so it doesn't move around with different resolutions/screen sizes.
It looks like you've already got postion: relative; on your .container so you've figured it out.

Here's a quick tutorial on positioning (http://www.barelyfitz.com/screencast/html-training/css/positioning/) that may help.