SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Hybrid View

  1. #1
    SitePoint Zealot bensheard's Avatar
    Join Date
    Jun 2006
    Location
    Cape Town | South Africa
    Posts
    117
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Postioning of divs

    Hi
    At the moment I have a free website so there are banners at the top for advertising. I have about 4 divs that use top:40; left:50 so when I acually open the webpage they are not where they are supposed to be as they stay in the same place but the rest of the page moves down because of the banners. Is there any way I can get around this? maybe somehting to do with position:absolute???

    Thanks
    Ben Sheard
    -------------
    Log all your dives easily and quickly from anywhere in the world
    www.divinglogs.cafe150.com

  2. #2
    Non-Member deathshadow's Avatar
    Join Date
    Jul 2006
    Location
    Dublin, NH
    Posts
    901
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'd have to see the code to the actual site, but if you add the height of the ad banner to the top:40 - that should put it in the right place, Ja?

  3. #3
    SitePoint Zealot bensheard's Avatar
    Join Date
    Jun 2006
    Location
    Cape Town | South Africa
    Posts
    117
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, but I think somethings there are different ads and they are different heights. There is not much I can do until I can get a proper host. Thanks
    Ben Sheard
    -------------
    Log all your dives easily and quickly from anywhere in the world
    www.divinglogs.cafe150.com

  4. #4
    Carpe Diem = Fish of the Day fisherboy's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    488
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you add a div with clear: both; immediately under the ads? Then use position: relative; to sort out your other elements?

    Even this may not be necessary but without seeing the page it's hard to tell. Can you post a link?

    From your description it sounds like it's position: absolute; thats killing you.
    fisherboy
    Web Site Design

  5. #5
    SitePoint Zealot Sleeper's Avatar
    Join Date
    Mar 2001
    Location
    Sydney, Australia
    Posts
    143
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you tried layering two divs over the base of the page?

    One for the background at z-index:2 and then the rest on z-index:3 and such?

  6. #6
    SitePoint Zealot
    Join Date
    Apr 2006
    Location
    Ohio USA
    Posts
    171
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try putting all of your code in a wrapper div set to position relative.
    The wrapper itself will get pushed down and the other positioned divs will take their positions off of it.


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
  •