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 6 of 6
  1. #1
    Member averan's Avatar
    Join Date
    Jan 2005
    Posts
    39
    Member #
    8796
    this is an unanswered thread from before...

    i'm having a really hard time arranging divs on a page.

    i seem to have worked most of it out, but still i can't center/vertical-align my main div in the window/body.

    how do you align divs without setting specific px or % margins to them???


    ps: why doesn't WDF allow css attachments???

  2.  

  3. #2
    Senior Member Eddy Bones's Avatar
    Join Date
    Jan 2004
    Location
    Washington, USA
    Posts
    1,054
    Member #
    4651
    In your page div, put in margin: 0px auto;

    Oh, take out the height: 100%; because it's useless.

  4. #3
    Member averan's Avatar
    Join Date
    Jan 2005
    Posts
    39
    Member #
    8796
    setting the margin to 0 and auto doesn't affect the positioning of the div.

    taking out the "useless" height shrinks the div down to a sliver!

    i want the #page div to be centered on the screen/body.....
    anyone have any other suggestions?

  5. #4
    Senior Member Eddy Bones's Avatar
    Join Date
    Jan 2004
    Location
    Washington, USA
    Posts
    1,054
    Member #
    4651
    Oh, it's because you're using absolute positioning on the div. If you set it at relative, it might work.

  6. #5
    Member averan's Avatar
    Join Date
    Jan 2005
    Posts
    39
    Member #
    8796
    anyone out there know how to get a nested div to vertical-align: middle???

  7. #6
    Senior Member Eddy Bones's Avatar
    Join Date
    Jan 2004
    Location
    Washington, USA
    Posts
    1,054
    Member #
    4651
    Oh my lord, I was reading your question wrong the whole time... I'm sorry! Now I feel like and idiot

    Let me offer this: http://www.jakpsatweb.cz/css/css-ver...-solution.html

    Not sure if you can vertically align without percentages.

    I'll look into it more for you


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
  •  
All times are GMT -6. The time now is 10:03 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com