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 7 of 7
  1. #1
    New Coder
    Join Date
    Jan 2008
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Can't get absolute pos to work

    Hi guys

    In an effort to have a div with a semi transparent background, I have made two divs - one with the transparency, and another to place over the top for my content.

    I can't get my overlay div to position correctly - it seems that ie and FF start off placing the div from different positions.

    The page is at www.popbeatblues.com.au/rw/artist_1.php

    Also, making the overlay have an absolute position has chnaged the appearance of it's content divs too.

    Any ideas what I'm doing wrong?

    Cheers

    Shaun
    Last edited by bigbadroo; 02-26-2008 at 06:24 AM.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    A correct url would be the first thing. I get a server not found on that url.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New Coder
    Join Date
    Jan 2008
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts
    He he - all fixed now Aerospace - www.popbeatblues.com.au/rw/artist_1.php

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,801
    Thanks
    160
    Thanked 2,216 Times in 2,203 Posts
    Blog Entries
    1
    Absolutely positioned elements don't need a float. You may have to set right/left and top/bottom values.
    BTW, always place absolutely positioned elements inside a relatively positioned container.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #5
    New Coder
    Join Date
    Jan 2008
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the tips guys. I tried them, but the DIV is still in a different postion in IE and FF. It takes it's postion from the DIV "middle" in FF, but after the DIV "menu" in IE.

    Any other thoughts on how to fix it?

    My aim is just to have a div with a semi-transparent background, but not transparent contents. I could do it in photoshop, but I want to master just using DIVs with transparent backgrounds, so as not to have to worry about aligning images.

    Cheers

    S

  • #6
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    You've already been given the solution. You need to set the top and left values in the CSS for the element that is position:absolute. Also if you don't need to make something position:relative; then don't, it can cause bugs in IE6.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #7
    New Coder
    Join Date
    Jan 2008
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ahh - when in doubt, follow the instructions I thought youi guys were being general - didn't realise there are Top and Left attributes you can change.

    Thanks heaps.

    Shaun


  •  

    Posting Permissions

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