+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 11 to 15 of 15

Thread: IE8 centering vertically and horizontally

  1. #11
    Barn Enthusiast Shem is on a distinguished road Shem's Avatar
    Join Date
    Mar 2008
    Posts
    305
    Rep Power
    4

    Your code comes out wrong on my machine too....

  2. #12
    Administrator richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere only we know...
    Posts
    3,207
    Blog Entries
    14
    Real Name
    Rich
    Rep Power
    14

    That's odd. It appears fine on mine.

    Perhaps I have another css file that is required. I do include 2 or 3 in the header.

  3. #13
    Administrator richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere only we know...
    Posts
    3,207
    Blog Entries
    14
    Real Name
    Rich
    Rep Power
    14

    Here you go Shem, try this. I included another "container" div to hold the login form
    Code:
    <div id="container">
            <div class="login_form">
    .
    .
    .
            </div>
    </div>
    
    And changed css to this:-
    Code:
    /* ============================== BODY ============================== */
        body {
    
            background-color:#FFFFFF;
            font-family:Arial, Helvetica,  sans-serif;
            padding:0;
            margin:0;
        }
    
    
    
    /* ============================== LOGIN ============================== */
    
    #container
    {
        width:100%;
        height:100%;
        position:absolute;
    }
    
    .login_form{
            padding:20px;
            background-color:#F1F3F5;
            border:1px solid #CCCCCC;
            width:600px;
            height:300px;
            position: relative;
                top: 50%;
            margin-top:-150px;
                margin-left: auto;
                margin-right: auto;
        }
    
    That appears fine in IE and FF for me.

    Hope that helps.

  4. #14
    Barn Enthusiast Shem is on a distinguished road Shem's Avatar
    Join Date
    Mar 2008
    Posts
    305
    Rep Power
    4

    Thanks RR so one container div did the trick... did I mention that I HATE IE?

  5. #15
    Administrator richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich is a splendid one to behold richyrich's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere only we know...
    Posts
    3,207
    Blog Entries
    14
    Real Name
    Rich
    Rep Power
    14

    I guess height on the body element isn't valid in IE8. So you need a container element to get the 100%.

+ Reply to Thread
Page 2 of 2 FirstFirst 1 2

Similar Threads

  1. How to display data vertically from sql??
    By dtz in forum ASP Development
    Replies: 11
    Last Post: April 28th, 2009, 12:10 PM
  2. How to display data horizontally??
    By dtz in forum ASP Development
    Replies: 5
    Last Post: February 19th, 2009, 02:04 PM

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

SEO by vBSEO