Setting right margin for HTML5 output (master page? layout? css?)
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
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
Copy link to clipboard
Copied
Thanks, Peter!
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.
Copy link to clipboard
Copied
Thanks very much, William!
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.

