Highlighted

Setting right margin for HTML5 output (master page? layout? css?)

Explorer ,
Dec 19, 2016

Copy link to clipboard

Copied

Hi all,

Currently, my content runs all the way across my widescreen monitor to the right edge of the monitor.

Is there a way to set a right margin so that digital output does not appear in a browser to run the entire horizontal width of the screen?

Or is the only answer to use tables -- to embed all body text in table cells in order to constrain "margins"?

Thanks.

Mark

Topics

HTML5 layout

Views

407

Likes

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

Setting right margin for HTML5 output (master page? layout? css?)

Explorer ,
Dec 19, 2016

Copy link to clipboard

Copied

Hi all,

Currently, my content runs all the way across my widescreen monitor to the right edge of the monitor.

Is there a way to set a right margin so that digital output does not appear in a browser to run the entire horizontal width of the screen?

Or is the only answer to use tables -- to embed all body text in table cells in order to constrain "margins"?

Thanks.

Mark

Topics

HTML5 layout

Views

408

Likes

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
Adobe Community Professional ,
Dec 23, 2016

Copy link to clipboard

Copied

Take a look at CSS Margin​. You can apply any or all of the margin styles in your CSS.


See www.grainge.org for RoboHelp and Authoring information

@petergrainge

www.grainge.org for free RoboHelp & Authoring info. Use the blue Reply button at the top to help me help you.
The black Reply link nests replies and they sort out of order.

Likes

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
Reply
Loading...
Explorer ,
Dec 23, 2016

Copy link to clipboard

Copied

Thanks, Peter!

Likes

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
Reply
Loading...
LEGEND ,
Dec 31, 2016

Copy link to clipboard

Copied

A margin works if you always want a specific margin on one of the sides. I understand your question as to limit the maximum width of the page so that it only affects wide screens.

In that case, you can set a maximum width to all elements in topics. If you add the following to your CSS:

body { max-width: 1000px; }

The content will be 1000px wide at maximum. But for smaller screens, the content will behave as it always has. You can also apply this to specific elements, for example if paragraphs should be 1000px wide, but tables and images are allowed to become wider.

p, ul, ol { max-width: 1000px; }

will only limit paragraphs, numbered lists and bulleted lists.

Likes

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
Reply
Loading...
Explorer ,
Jan 03, 2017

Copy link to clipboard

Copied

Thanks very much, William!

Likes

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
Reply
Loading...
Explorer ,
Jan 03, 2017

Copy link to clipboard

Copied

p.s. That's exactly what I needed -- how to set max width for all elements in all topics, for wide screens. Thanks again.

Likes

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
Reply
Loading...