Display horizontal scroll bar without scrolling to the bottom of charts in TNG

Steve
Posts: 61
Joined: Sun Oct 01, 2017 3:08 pm

Display horizontal scroll bar without scrolling to the bottom of charts in TNG

Post by Steve » Wed Feb 06, 2019 10:14 pm

Depending on the number of ancestors or descendants displayed, long TNG charts often require scrolling to the bottom of the page to access the horizontal scroll bar. You can add some css code to mytngstyle.css, for the active template, to display the scroll bar when the chart width exceeds the browser width, without scrolling to the bottom of the page.

Code: Select all

/* Controls window height for charts */
.LB_content, #outer, #mapevents {
	height: 400px !important;
}
Change the height, in pixels, to choose the chart size you want to display. You do not need to use margin-bottom but it is included in case you want to adjust spacing at the bottom of the chart. The only drawback is charts will not scroll automatically to the root person since the chart size was changed. However I've found this is a small trade-off versus scrolling to the bottom and back up again to find someone. The code does not affect fan charts.
Last edited by Steve on Thu Feb 21, 2019 6:16 pm, edited 1 time in total.
Reason: Removed margin which affected the map display