Hide Scrollbars in Overflow Auto

V

vunet.us

How can I hide scrollbars which appear in my floating div element with
CSS property overflow:auto?
I do need to use auto overflow.
Thank you.
 
W

Walton


I'm not aware of any way to hide scroll bars once you've told the
browser to turn them on. It seems to me that scroll bars are more of
a component of the operating system which means as a html/css/
javascript developer, you really don't have much control over them.

one hack:

have you tried wrapping the floating div in a slightly smaller div
that cuts off the portions where the scrollbars are?

<div id="wrapper" style="width: 183px; height: 183px; overflow:
hidden; border: solid black 1px">
<div id="floating-div" style="width: 200px; height:200px; overflow:
auto">
floating div content...
</div>
</div>

I'm not sure if that works with the bug though.
 
V

vunet.us

I'm not aware of any way to hide scroll bars once you've told the
browser to turn them on. It seems to me that scroll bars are more of
a component of the operating system which means as a html/css/
javascript developer, you really don't have much control over them.

one hack:

have you tried wrapping the floating div in a slightly smaller div
that cuts off the portions where the scrollbars are?

<div id="wrapper" style="width: 183px; height: 183px; overflow:
hidden; border: solid black 1px">
<div id="floating-div" style="width: 200px; height:200px; overflow:
auto">
floating div content...
</div>
</div>

I'm not sure if that works with the bug though.

thank you. i'll try your solution. possibly, i'll create a JS function
to justify div's height to avoid appearing of scrollbars.
 
O

OmegaJunior

How can I hide scrollbars which appear in my floating div element with
CSS property overflow:auto?
I do need to use auto overflow.
Thank you.

Did you try wrapping it up in another floated div? One of the methods I've
used was to have an outer div with overflow:auto and an inner div with
overflow:visible. Then set the inner div to width:99% and padding:0 and
margin:0.

Reason for not using javascript in this case: what happens if a user's
browser has javascript turned off by default (*cough*Microfost Internet
Exploder 7*cough*)?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,078
Latest member
MakersCBDBlood

Latest Threads

Top