• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

Explorer ,
Jun 03, 2020 Jun 03, 2020

Copy link to clipboard

Copied

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?

Views

705

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 03, 2020 Jun 03, 2020

Copy link to clipboard

Copied

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.

 

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 03, 2020 Jun 03, 2020

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 03, 2020 Jun 03, 2020

Copy link to clipboard

Copied

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.

 

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 03, 2020 Jun 03, 2020

Copy link to clipboard

Copied

I am selecting a <p>  then going to Properties>CSS>Edit rule the following dialog appears

Screen Shot 2020-06-04 at 9.43.31 am.png

Which I change to this:
Screen Shot 2020-06-04 at 9.44.29 am.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 03, 2020 Jun 03, 2020

Copy link to clipboard

Copied

CSS Definition for body, td, th is not the paragraph tag.  It's the whole enchilada.

You have effectively reduced entire page width to 800px and removed centering.  Don't do that.

 

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 03, 2020 Jun 03, 2020

Copy link to clipboard

Copied

LATEST
My personal opinion is that you should port your site over to Bootstrap. I live in Mt Eliza and, if you are closeby, give me call - 0431363276
Wappler, the only real Dreamweaver alternative.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines