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
    Junior Member
    Join Date
    Feb 2003
    Posts
    2
    Member #
    687
    Hi All,

    I want to vertically center objects on the screen.

    I have set up 2 demonstrations for you:

    1) http://www.geocities.com/andy_sansan/sample/liquid.html
    2) http://www.geocities.com/andy_sansan...enter_div.html

    Page 1 aligns all objects wonderfully with ns7, ie6, and opera 7.

    The divs on page 2 are vertically centered with ns7, and opera 7, but NOT with

    ie6.

    BTW: Both pages use exactly the same javascript - getScreenSize.js! One would

    expect the same result for both pages.

    The reason for the divs on page 2 to be displayed so high up on ie6 is because

    the function returning the document's height returns "40" for the height of the

    browser window, yet it returns "643" for page 1.



    Why is this?

    Andy

  2.  

  3. #2
    Guest
    Sorry but I couldn't find any threads that seemed to be related to yours. I'm sure a human will reply soon to help out.

  4. #3
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    The magical way but probably something W3C would scorn:
    Code:
    <table height="100%" width="100%">
    <tr>
    <td align="middle" valign="middle">this is in the center</td>
    </tr>
    </table>
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  5. #4
    Junior Member
    Join Date
    Feb 2003
    Posts
    2
    Member #
    687
    u r right! That is the magical way, and W3C scorns it!

    Also "height=100%" doesn't work with opera. So it probably won't work on a whole host of new browsers and future mobile phones.

    That's why I would really like to solve my original problem.

  6. #5
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    Opera has a tendency to screw up even perfect HTML layouts...
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  7. #6
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,485
    Member #
    425
    Liked
    2783 times
    Did you try "vertical-align: center" for the DIV in your CSS yet?
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)


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 08:56 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com