How to Get Horizontal scroll to DIV in asp.net , here is the trick
You shouldn't get both horizontal and vertical scroll bars unless you make the content large enough to require them.
However you typically do in IE due to a bug. Check in other browsers (Firefox etc.) to find out whether it is in fact only IE that is doing it.
IE6-7 (amongst other browsers) supports the proposed CSS3 extension to set scrollbars independently, which you could use to suppress the vertical scroll bar:
On the other hand it's entirely possible IE8 will have fixed the bug anyway.
You shouldn't get both horizontal and vertical scroll bars unless you make the content large enough to require them.
However you typically do in IE due to a bug. Check in other browsers (Firefox etc.) to find out whether it is in fact only IE that is doing it.
IE6-7 (amongst other browsers) supports the proposed CSS3 extension to set scrollbars independently, which you could use to suppress the vertical scroll bar:
overflow: auto;
overflow-y: hidden;
You may also need to add for IE8:-ms-overflow-y: hidden;
as Microsoft are threatening to move all per-CR-standard properties
into their own ‘-ms’ box in IE8 Standards Mode. (This would have made
sense if they'd always done it that way, but is rather an inconvenience
for everyone now.)On the other hand it's entirely possible IE8 will have fixed the bug anyway.
To show both:
<div style="height:250px; width:550px; overflow-x:scroll ;
overflow-y: scroll; padding-bottom:10px;">
</div>
Hide X Axis: <div style="height:250px; width:550px; overflow-x:hidden;
overflow-y: scroll; padding-bottom:10px;">
</div>
Hide Y Axis:<div style="height:250px; width:550px; overflow-x:scroll ;
overflow-y: hidden; padding-bottom:10px;">
</div>
you can also make it
overflow: auto
and give a maximum
fixed height and width that way, when the text or whatever is in there,
overflows it'll show only the required scrollbar
Comments
Post a Comment