treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Wordpress Problem - Comments Template - Page Shift

  • I am pretty new to all things web design. Thanks to this site I have gone from zero code knowledge to designing my very first site.

    For reference. My Site is http://www.samorf.com

    As for my problem it has to do with the comments template and single pages shifting to the right when there is a comment box. I am using the basic comment template that was in the starkers theme. The problem happens in firefox and sarfari but seems to be ok in IE7. If I remove these 2 lines from the comment template it doesnt shift the page but it obviously takes out the comment box and submit button.

    <textarea name="comment" id="comment" cols="60%" rows="10" tabindex="4"></textarea>
    <input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />

    I have tried to delete certain parts of these lines. I have tried to style the ids with a margin and width. I just don't know whats causing the entire page to shift over slightly.

    Please let me know if you need anymore info and thanks for your help!
    Sam
  • It had something to do with the length of the index page. I created several test posts to increase the height of the main column and this fixed the problem. I read somewhere it had to do with the scroll bar.

    I am still unsure how this happened but I guess it will be a problem until I get more actual posts.
  • Add this to your stylesheet to force a scrollbar on pages that don't have one:
    html {
    overflow-y: scroll;
    }
  • Very helpful. Thank you much.

    Sam