Margin between content and overflow div scrollbar

I use the following bits of code to keep menu items fixed, allowing me to scroll through the content because it seems to be the most stable method in all browsers.

body { overflow: hidden; } div.content { height: 100%; overflow: auto; } 

My problem is simple, and yet I cannot figure out that the content inside the tag is leaning against the scroll bar for the div area, and this makes reading a lot more difficult. How can I get the difference between them (besides floating the transparent image to the right to create space, there should be a better way)?

+4
source share
1 answer
 div.content { height: 100%; overflow: auto; margin:0 15px } 

Perhaps I misunderstood you by posting HTML code, if I have one.

0
source

Source: https://habr.com/ru/post/1305741/


All Articles