Skip to main content
Inspiring
Jun 3, 2020 3:35 PM UTC
Question

Whole page shifting left when I define a <p> width.

OK, I know I'm asking this question because I'm an absolute beginner when it comes to CSS but here goes.

Many of the pages on my website (older ones created with GoLive) Are just <p> <img> <p> <img> and on and on.

A page I am working on is all nice and centred and then I select a <p> and go "edit rule" and go to box and  change it from auto to 800px. I do this so the text doesn't go all the way across the page which makes it hard to read. When I hit apply it changes the box but the whole page goes from being centered to being left justified. Everything on the page is up against the left border. What on earth is going on?

    This topic is closed to new replies. Start a new post to keep the conversation going.

    6 replies

    Nancy OShea
    Community Expert
    Community Expert
    Jun 3, 2020 5:38 PM UTC

    Review the CSS Box model.

    https://www.w3schools.com/css/css_boxmodel.asp

     

    You didn't mention which property you changed so it's impossible to comment.  For better answers, show us your code.

     

    Translate
    Nancy O'Shea— Product User & Community Expert
    gunzelguyAuthor
    Inspiring
    Jun 3, 2020 5:46 PM UTC

    The property I changed was <p> Box width, I changed it from auto to 800px wide.

     

    Here is a link to the page.

     

    https://www.victorianrailways.net/photogallery/suburb/sandingham_line/sandringham_line.html

    Translate
    Nancy OShea
    Community Expert
    Community Expert
    Jun 3, 2020 8:16 PM UTC

    There is no such CSS property as box-width or box width. 

    Perhaps you mean CSS box-sizing? 

    In any case, the URL you posted contains neither.

     

    Translate
    Nancy O'Shea— Product User & Community Expert