I have a div which visibility is being switched. The div also has the scrollable propertie overflow. The code works correct in Firefox. But in Chrome the scroolbar is seen even if the div visibility is set to hidden. How to fix this?
CSS:
.dhHelp{
position:absolute;
top:5px;
left:6px;
visibility: hidden;
width: 120px;
height: 220px;
z-index:999;
background-color:black;
border: solid #33ccff 2px;
font-size: 10px;
overflow:scroll;
color:white;
}
actually in
visibility : hidden– element will take its space , so scroll bar is there,try after
display:none– with this property it will not take space in your page and will be hidden.