Results 1 to 4 of 4

Thread: apDivs that were working - now won't stay put!

  1. #1
    Join Date
    Mar 2009
    Location
    Phoenix
    Posts
    17
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default apDivs that were working - now won't stay put!

    UPDATE : Since I posted the Messed up version - whatever did this is now doing it to the whole previously posted site - I overwrote something I shouldn't have - Help!!?*@

    I designed using apDivs to give me some flexibility and I plan to get rid of most of them once the design is settled down.

    In the meantime, something I've done has got them where they won't stay in their place when the browser window gets wider than the outer wrapper.

    I'm going nuts trying to see the difference between the pages that were working fine and the messed up version which was the result of trying to place some nested divs into the layout, so I could replace the apDivs.

    Now, all the original files on my local drive, from before I started trying to nest the Divs on just one of the files, are all behaving like this.

    Take a look if you think you can help...

    Before:
    http://www.kdpools.net/new/Rectangle.html

    After:
    http://www.kdpools.net/new/RectangleMessedUp.html

    Sure do appreciate any advice.


    Thanks,
    Susan
    Last edited by susaninphoenix; 03-23-2009 at 07:14 PM. Reason: Improved Title for post

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Add this to your CSS code:
    Code:
    #wrapper {
    background-color:#FFFFFF;
    margin-left:auto;
    margin-right:auto;
    width:816px;
    position: relative;
    }
    Absolutely positioned elements will position themselves inside the first parent element that has a specified position, in your case the body element. By specifying a position for the wrapper, the absolutely positioned elements inside it will position themselves inside the wrapper container instead and will not be affected when the browser window is resized.

    Good luck!

  3. The Following User Says Thank You to Snookerman For This Useful Post:

    susaninphoenix (03-23-2009)

  4. #3
    Join Date
    Mar 2009
    Location
    Phoenix
    Posts
    17
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    Snookerman,
    As usual, you saved the day! ...without ridiculing my imperfect code.

    I love how your advice is so concise and directly to the point.


    Thanks so much!!

  5. #4
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    You're welcome Susan, I'm always happy to help!

    Good luck with the site!

Bookmarks

Posting Permissions

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