Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jan 2009
    Posts
    15
    Thanks
    3
    Thanked 0 Times in 0 Posts

    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

  • #2
    New Coder
    Join Date
    Jan 2009
    Posts
    15
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Think I've solved it - just added <span style=" and adjusted the left position. Does that sound right??!!

    Emma

  • #3
    New Coder
    Join Date
    Jan 2009
    Posts
    15
    Thanks
    3
    Thanked 0 Times in 0 Posts
    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

  • #4
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,749
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    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


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •