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

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

Explorer ,
Dec 19, 2016 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

Views

547

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

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

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

Copy link to clipboard

Copied

Thanks, Peter!

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

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 ,
Jan 03, 2017 Jan 03, 2017

Copy link to clipboard

Copied

Thanks very much, William!

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 ,
Jan 03, 2017 Jan 03, 2017

Copy link to clipboard

Copied

LATEST

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

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
Resources
RoboHelp Documentation
Download Adobe RoboHelp