css overflow hide scrollbar when not needed

CSS
/*
The overflow property has the following values:

visible - Default. The overflow is not clipped. The content renders outside the element's box
hidden - The overflow is clipped, and the rest of the content will be invisible
scroll - The overflow is clipped, and a scrollbar is added to see the rest of the content
auto - Similar to scroll, but it adds scrollbars only when necessary

*/

div {
  overflow: auto;
} 
Source

Also in CSS: