Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-01-2012, 03:27 PM   PM User | #1
emu_robot
New Coder

 
Join Date: Jan 2009
Posts: 15
Thanks: 3
Thanked 0 Times in 0 Posts
emu_robot is an unknown quantity at this point
On rollover, text appears underneath pic...

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
emu_robot is offline   Reply With Quote
Old 02-01-2012, 04:39 PM   PM User | #2
emu_robot
New Coder

 
Join Date: Jan 2009
Posts: 15
Thanks: 3
Thanked 0 Times in 0 Posts
emu_robot is an unknown quantity at this point
Think I've solved it - just added <span style=" and adjusted the left position. Does that sound right??!!

Emma
emu_robot is offline   Reply With Quote
Old 02-01-2012, 10:19 PM   PM User | #3
emu_robot
New Coder

 
Join Date: Jan 2009
Posts: 15
Thanks: 3
Thanked 0 Times in 0 Posts
emu_robot is an unknown quantity at this point
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?

Thanks!

Emma
emu_robot is offline   Reply With Quote
Old 02-02-2012, 04:37 PM   PM User | #4
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
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 that may help.
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Reply

Bookmarks

Tags
display, image, position, rollover, text

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:15 AM.


Advertisement
Log in to turn off these ads.