I am using overflow:scroll like the code below, the issue I am having is that even if there is no text the scroll bar still shows.
demo on w3schools: http://www.w3schools.com/cssref/tryit.asp?filename=trycss_overflow
you see that even if you cant scroll horizontally (left or right) there is still a scrolling bar. I am trying to have it where the scrollbar doesn’t appear if there is nothing to scroll to.hope this makes sense
<style type="text/css">
div.scroll {
background-color: #00FFFF;
width: 100px;
height: 100px;
overflow: scroll;
}
</style>
<p>overflow:scroll</p>
<div class="scroll">You can use the overflow property when you want to have better control of the layout. The default value is visible.</div>
I think you are looking for
overflow: auto.Mozilla’s Documentation on Overflow
auto