Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 9 of 9
  1. #1
    Senior Member
    Join Date
    Dec 2003
    Posts
    1,274
    Member #
    4362
    When you relative postion a element (in this case a <div>), it's position is based from the position that would be at if you don't change anything.
    I use that for every div in the page, but when you have too many divs, the scrollbar (vertical) begins to grow, even if there is nothing at the bottom, because the scrollbars size is calculated from the size of the whole page, with the not-yet-newly positioned elemnts.

    So what I want is that the are that is clear is taked in account with the scrollbar.
    I can do that with absolute postioning, but I can't find any way to use absolute pos on a center aligned layout.
    I attach a sketch of the problem.

    The page where the problem is present:
    http://xtdesign.net/v8/

    Thanks and thanks again

  2.  

  3. #2
    Senior Member
    Join Date
    Dec 2003
    Posts
    1,274
    Member #
    4362
    ooops, forgot to attach the image
    Attached Images Attached Images

  4. #3
    Senior Member teal's Avatar
    Join Date
    Dec 2003
    Posts
    247
    Member #
    4319
    I see your problem, and you are right, that is serious. If I were you, I would redo your whole layout, using tables instead, since they render much more reliably. Also, if your page will never be larger then the browser window, you could just disable the scrollbars completely. I belive you would just add to the <body> tag scroll="no", but you should double check that one on your own if you want to try it.
    Whoth steps forth to mock the teal? Whom couldst say a color superior!

    Proclamith me, it cannot be done.

  5. #4
    Senior Member
    Join Date
    Dec 2003
    Posts
    1,274
    Member #
    4362
    Hey, tables suck. I'm sure I can solve this with CSS.

  6. #5
    Senior Member Brak's Avatar
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    3,413
    Member #
    1217
    Liked
    2 times
    Use float and margins to solve this problem. Check out how they did it on the layout resavoir on www.bluerobot.com

    No relative positioning needed
    Kyle Neath: Rockstar extraordinare
    The blog | The poetry site | The Spore site

  7. #6
    Senior Member
    Join Date
    Dec 2003
    Posts
    1,274
    Member #
    4362
    float and margins? How?
    margins? I want to position a div... does margins help?
    And if not relative, absolute then?
    I can specify with absolute how far from the top it is, but not how far from the left or right, because that changes with resolution.

    Isn't it possible to use absolute positioning but that the origin from the x0 y0 is not the top-left corner of the window, but of the parent <div>?
    Thanks

  8. #7
    Senior Member Brak's Avatar
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    3,413
    Member #
    1217
    Liked
    2 times
    No position at all dude, did you look at the code?

    The idea is to float one of them, and use margins to make sure it gives room for the other elements.

    Look at the code at the layouts at www.bluerobot.com, or at www.neathdesign.com, you wont see any positioning in there whatsoever, yet everything is positioned on the page
    Kyle Neath: Rockstar extraordinare
    The blog | The poetry site | The Spore site

  9. #8
    Senior Member
    Join Date
    Dec 2003
    Posts
    1,274
    Member #
    4362
    That is pretty easy to do with 100% width elements, but I can't get it working in static 770px width layout

  10. #9
    Senior Member Brak's Avatar
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    3,413
    Member #
    1217
    Liked
    2 times
    Dude, please look at the code!! It's the same exact principle. I've applied it exactly at www.neathdesign (a static layout).
    Kyle Neath: Rockstar extraordinare
    The blog | The poetry site | The Spore site


Remove Ads

Posting Permissions

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

Search tags for this page

position relative scroll

Click on a term to search for related topics.
All times are GMT -6. The time now is 03:40 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com