Scrollbar appearance is causing an issue across different browsers. The truncated text in my side-navigation component is not displaying correctly on Firefox and IE browsers.
View this fiddle on both Chrome and Firefox:
https://jsfiddle.net/d84b9m49/10/
Upon inspection, the scrollbar positioning is different in Webkit as opposed to Firefox/IE. In Firefox, the scrollbar appears within the right padding area of 65px (as specified in the style), while Chrome displays it outside the padding area, totaling 85px (65px + scrollbar width). In Firefox, when the scrollbar appears, the content inside the li
items is off-center with some text partially hidden below the scrollbar (triggering a horizontal scrollbar) whereas in Chrome, everything remains centered. Refer to the documentation for more details about this scrollbar handling difference (ISSUE 1):
https://drafts.csswg.org/css-overflow-3/#scrollable
A prior solution was applying max-width: 65px
(refer to this fiddle) but this approach is not ideal when dealing with short text that may cause the navigation's width to fluctuate undesirably.
Ensure the navigation component layout is maintained on smaller devices under 768px (in the example provided, it switches to "bottom" navigation).
The goal is to have the items in the navigation centered on both Chrome and Firefox, disregarding IE for now.
If anyone could provide assistance with this issue, any help would be greatly appreciated.
EDIT: For future reference, refer to the upvoted answers below based on your specific needs (either adopt the scroll check method or opt to remove scrollbars while adding scrolling arrows).