3 replies [Last post]
Anonymous
Anonymous's picture
Guru
calgary,alberta
calgary,alberta

Hello!

I would like to hide ONLY the horisontal scroll bar in my IFRAME.
Vertical scroll bar should be visible

paCkeTroUTer
paCkeTroUTer's picture
Offline
Enthusiast
Melbourne, Australia
Last seen: 6 years 30 weeks ago
Melbourne, Australia
Timezone: GMT+10
Joined: 2003-06-27
Posts: 241
Points: 2

How to get rid of just Horisontal Scroll Bar?

I don't think its possible. Its either of the following 3 possible solutions you have. Experiment with them and see if it suits you. I am not sure if you can achieve it via CSS.

<iframe scrolling="auto" >
<iframe scrolling="no" >
<iframe scrolling="yes" >

http//melbourne.ug.php.net

Anonymous
Anonymous's picture
Guru

How to get rid of just Horisontal Scroll Bar?

in css you would use the overflow-property: http://www.w3.org/TR/REC-CSS2/visufx.html#propdef-overflow

if you use overflow: auto; there will only be a horisontal scrollbar if the content is wider than the iframe.

there is another solution, but it only works in IE so do not recommend it:
overflow-x: hidden;
overflow-y: scroll;

josh_anomaly
Offline
newbie
Last seen: 16 years 8 weeks ago
Joined: 2003-10-17
Posts: 1
Points: 0

How to get rid of just Horisontal Scroll Bar?

I have a similar need -- to disable only horizontal scrolling in an iframe -- but I haven't been able to make the CSS solution work. How, specifically, should these CSS attributes be declared? In other words, if I want document A to include a little window showing document B, do I stick the CSS attributes in the <iframe> tag of document A, or do I stick it in the <body> tag of document B?

Any help is appreciated. Thanks.