Forums

[resolved] Whole page moves when images are present (5 posts)

  1. wdawson
    Member
    Posted 2 years ago #

    http://willdawson.net

    On any page where there is an image in the post content, the whole page shifts a little bit horizontally. For example, if you go to the About page and then go to a category page, you see the whole thing shift. This does not happen when going from one page with an image to another with an image or a page without an image to another page without an image.

    Here's the styling on images:

    .postcontent img{
    margin: 5px 0px 5px 0px;
    padding: 0px;
    }

    Anybody have any idea what may be causing this?

    Container styling:

    #container{
    width: 720px;
    float: right;
    margin-left: 0px;
    margin-right: auto;
    margin-top: -3px;
    }

    Sidebar styling:

    #sidebar{
    width: 170px;
    margin-right: 30px;
    float: left;
    margin-left: auto;
    }

    Thanks a lot!

  2. alchymyth
    The Sweeper
    Posted 2 years ago #

    check if the longer page with the image creates a vertical scrollbar in the browser on the right.

    on my smaller laptop screen i have always a scrollbar and can see no jumping ;-)

    if this is annoying, you could add 'overflow-y:scroll;' to the body style in style.css:

    body{
    background-color: #fafaf0;
    letter-spacing: 0em;
    overflow-y:scroll;
    }
  3. wdawson
    Member
    Posted 2 years ago #

    Yep, that's it alright. So there's no way around it then? I mean it's not a huge deal. Thanks so much though, didn't even think about that.

    Thoughts on design btw? It's my first theme and so far I think I'm relatively happy with it.

  4. wdawson
    Member
    Posted 2 years ago #

    Ahh didn't see the fix you included for some reason when I read your response, but it worked perfectly, thanks a lot! What exactly does that code do?

  5. alchymyth
    The Sweeper
    Posted 2 years ago #

    yeah, i like the design, nice clean lines, good spaced out.
    and validated ;-)

    the scroll code kind-of forces a(n empty) scroll bar to the y axis;

Topic Closed

This topic has been closed to new replies.

About this Topic