iframes Q
- Started
- Last post
- 7 Responses
- tangereen
how do i get my iframe not to scroll horizontally, but still scroll vertically?
- mg330
make the table inside it smaller than the total width of the iframe container.
- Jnr_Madison0
Just in case that doesn't fix it...
- Jnr_Madison0
Or this - from google
THE WORKAROUNDS:
There are three ways to get rid of the unnecessary horizontal scrollbar in IE (you only have to do one of the three):
1) Set the body style of the page that appears within the iframe to:
display: inline;
( or use a style sheet or set the style in the header)
The reason this works is because it forces the body with to be only as wide as its content.2) Set the doctype of the page that appears within the iframe to
(leave out the link to the dtd)
3) in the iframe tag, set the attribute:
scrolling="yes"
(This will cause the vertical scrollbar to always be present, but the horizontal scrollbar will appear only when necessary. The reason this works is because in this situation, IE allots space for the vertical scrollbar before setting the width of the included body.)
- tangereen0
im not comfortable with messing with the doctype...
just found a solution though -- i set the width of the body in the source page and FINALLY that gets rid of the horizontal scrolling in IE. firefox had no such problems to start with.
thanks mg33 and jnr -- ur comments gave me the idea to set the body { width:}
- Jnr_Madison0
I had horizontal scrolling in firefox I take it the version on your site is the unchanged version?
- tangereen0
ya, hehehe... not ready for mass consumption yet. thanks for checking it out though.
- Jnr_Madison0
Ha ha.. cool.