Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Centering Issues in Chrome

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #31347
    Jeager
    Member

    OK.. I have a older site I’ve been updating for a client and got annoyed by all the random JavaScript and table formats, so today I just redid the entire thing. Problem is now, all but 2 of the sites center properly. I made a basic template and saved it as each site. I used the ‘auto auto’ left and right for centering a wrapper. However these two sites, which I made from the same template. I even saved one of the correct pages and edited the content but it ended up doing the same thing. Basicly the two pages go from centered to bumped over to the right, like theres some kind of margin (checked a few times, could not find anything). But then I tested outside of chrome in IE and FF but did not have the same issue, all the sites aligned correctly. However in chrome when you minimize the browser some, it works..

    Any ideas how to fix it?

    #64502
    Jeager
    Member

    Normally I do reset, forgot this time. And also, I was always taught to just set left and right margins to auto, never the way you described. I’ll give it a go though.

    Edit: Did the recommended changes. Did not work.

    Edit 2: As I said in the first post, its odd how it will work when I resize chrome, and it always works in IE and FF. Maybe i’ll try FTPing it and seeing it on another computer.

    #64489
    Jeager
    Member


    CSS:

    #wrapper {
    height: auto;
    width: 800px;
    margin: 0 auto;
    padding-top: 5px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    }
    #wrapper #header {
    height: 143px;
    width: 800px;
    margin-top: 0px;
    }
    #anplogo {
    float: left;
    height: 143px;
    width: 196px;
    margin-right: 45px;
    }
    #divider {
    float: left;
    height: 136px;
    width: 4px;
    margin-top: 3.5px;
    }
    #text {
    height: 59px;
    width: 502px;
    float: right;
    margin-top: 84px;
    }

    Image: (not sure if there was a better way of hosting…)
    http://i71.photobucket.com/albums/i157/Cr0n0dbz/img.gif

    #64472
    clokey2k
    Participant

    Silly question – are the vertical scrollbars appearing on all of the pages? it might be the viewport being shrunk after accomodation the 7-10px required to display a scrollbar. When you resize the window the scroll bar appears?

    Try ‘overflow-y: scroll’ on the ‘html’ element to add a scrollbar on all pages regardless.

    #64097
    Jeager
    Member

    Try ‘overflow-y: scroll’ on the ‘html’ element to add a scrollbar on all pages regardless.

    This. Worked. Thank you good sir, never even considered that possibility. Works perfectly now

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘CSS’ is closed to new topics and replies.