Reputation: 2445
I have an issue which only occurs in small desktop browser windows. The 'responsive design mode' shows the content as intended, however if I resize my browser to the same dimensions in a normal browser window the view is changed.
More specifically I did a 'hidden scroll bar css trick' roughly just the css:
padding-right: 17px;
box-sizing: content-box;
overflow-y: scroll;
width: 100%;
In the 'responsive design mode' the view looks roughly like this:
In a small browser window with the same size the view looks like this:
This is fixable by adjusting the width to 102%, but the question is:
How do I target only small browsers and not mobile devices ? Perhaps even better, what 'hide scroll bar' css trick could avoid this issue on small desktop browsers ?
I prefer a sass only solution, but jquery options could be a workaround.
Upvotes: 1
Views: 115
Reputation: 127
Please include overflow-y: auto;
instead of overflow-y: scroll;
. As, overflow-y
with scroll
property adds scroll bar no matter what is the situation. But on the other hand, overflow-y
with auto
adds scroll when content is exceeding the given limit.
Upvotes: 2