Hi there,
We want to produce a side navigation output in flare. We have used top navigation before and people like the white space that displays on either side of the content so that the content is narrow, making it more readable. So in the side navigation, I have tried adding padding left and right in the SideNav skin file and I have also tried setting the maximum width to something smaller than the default 100%. However, when I try this, the output for longer topics displays a scrollbar to the right of the topic (instead of in the normal place that the browser scrollbar should be).
Does anyone have any advice or tips on including white space on either side of the content in side nav, without having the scroll bar changing position?
Note: I have also tried editing the body-container class to include more padding on the right, but the text content seems to then display at different lengths in laptop and desktop screens, but I am not sure why.
thanks,
mark
Increasing the white space around a sidenav output
Increasing the white space around a sidenav output
You do not have the required permissions to view the files attached to this post.
-
TaylorTalkington
- Jr. Propeller Head
- Posts: 5
- Joined: Tue Nov 28, 2017 7:34 am
- Location: USA
Re: Increasing the white space around a sidenav output
I have something similar, and I use a div in the MasterPage, with margins set, for this.
So for the style:
And then I put the topic body proxy inside of a div with that class in the master page. I.e.:
The scroll bar is still at the far right edge of the window.
Note: this only puts the margin on the body content....the breadcrumb is still has no spacing. If you want to have space around everything, you'll have to put the rest inside the div, possibly nesting divs or using a table to arrange all of the elements.
So for the style:
Code: Select all
div.sidenav_content {
margin-left: 50px;
margin-right: 50px;
}
Code: Select all
....
<body>
<MadCap:breadcrumbsProxy />
<div class="sidenav_content">
<MadCap:bodyProxy />
</div>
</body>
....
Note: this only puts the margin on the body content....the breadcrumb is still has no spacing. If you want to have space around everything, you'll have to put the rest inside the div, possibly nesting divs or using a table to arrange all of the elements.
Re: Increasing the white space around a sidenav output
Thanks very much Taylor, I gave that a try. Does the amount of text per line vary for you on different sized screens?
-
TaylorTalkington
- Jr. Propeller Head
- Posts: 5
- Joined: Tue Nov 28, 2017 7:34 am
- Location: USA
Re: Increasing the white space around a sidenav output
I don't have a good way of testing what different DPI and font scaling would look like (which I think that is what you are getting at), but I think your issue there may be related to using pixels for the margin.rogersm wrote:Does the amount of text per line vary for you on different sized screens?
The px margins won't scale, so on a phone or tablet with a high DPI (ie. the same resolution as a large computer monitor). If you want the margins to be proportional to the font size, use ems, something like this:
Code: Select all
div.sidenav_content {
margin-left: 4em;
margin-right: 4em;
}
If you do mean different screen resolutions, then yes of course the text will be different as the space to display it is also different.
Re: Increasing the white space around a sidenav output
Thanks again, I will give ems a go so.