Forum Moderators: open
<iframe name="mainf" src="home.html" height="556" width=100% marginheight="0" marginwidth="0" frameborder="0" scrolling="auto"></iframe>
I know while (scrolling="auto") is there it will scroll, but because i have the (width="100%") the HORIZONTAL SCROLLBAR doesn't appear, in theory and on MAC ie and safari.
however, you need to make sure that your iframe content doesn't go beyond the right edge of its container in that case. The other option is to physically size the iframe content page to less than the width of the iframe.
iframe {
overflow-x: hidden;
overflow-y: scroll;
}
the scroll bars were still there.
I researched CSS and understand it, built some test sites just to make sure i was doing things correctly.
iframe {
overflow-x: hidden;
overflow-y: scroll;
}
didnt work.
the only thing that worked was
iframe {
overflow: hidden;
}
which took off both bars, i need the verticle.
Try two experiments with a FRAMED page (not the framing page.) First is to switch the rendering into quirks mode by removing the DTD, or at least the URL portion of the DTD. If that eliminates the scroll bar, you are suffering from this IE scrollbar "bug".
The second, look for any element that fills the entire width of the framed page and has width=100%. Especially (since <p> tags default to 100% width) try adding a style rule like this: p {width:95%}
Playing around in this fashion you may get a feel for what is forcing IE to show a horizontal scrollbar in your case. But again, I feel the fix will be found in the framed pages, not the framing page. And unfortunately, this bug is not easy to identify - maybe 20% of the time it doesn't appear when it seems like you would expect it.
I'm still trying to find a fix (other than removing the DTD).
The problem seems to be related to the vertical scrollbar. If no vertical scrollbar is required, the horizontal scrollbar also vanishes.
Kaled.
According to MS documentation, an unrecognised doctype will select standards mode - hence one observation above.
There are also changes in standards mode to width calculations and body and html relevance, so with a little experimentation, I found that body { width:98% } will cause the horizontal scrollbar to vanish if placed in the content page.
This may work with IFrames too but the smaller the frame, the smaller the % value is required. This will also depend on the width of the scrollbar.
[msdn.microsoft.com...]
Kaled.
Only Opera had scrollbars left and bottom always, but that's a default behavior, no way to get rid of it that I know, nothing to do with how something is coded.
Bottom scroll bars on iframe or frames doesn't happen if you make sure that widths are not explicitly declared anywhere on the content pages, this means just let the elements flow naturally, hx tags, p, divs, just let them fit themselves to the size of the container, I never saw this kind of problem when I used those methods.
The iframe or frame window acts pretty much exactly the same as a standard browser window, if you set the width of p as 100%, and then add padding to the p, it's going to force a bottom scroll bar, since then the width is 100% + the padding, which is > 100%, ergo scroll bar.
A doctype is required that causes IE to work in quirks mode. With HTML 4.01 trans this is as simple as deleting the url from the doctype. The code can still be validated, it just affects rendering.
Assuming that the contents of the IFrame are simple, this should not cause any problems. And, so far as I can tell, unless you are specifying both the width/height and margin/padding/border of an element, there should not be much of a problem.
For XHTML, etc. see the link below
[hut.fi...]
Kaled.
Its simple, if you are using dreamweaver any code writing program on a MAC OSX or higher, your document will work correctly ONLY on MAC browsers... ( i have used the CSS, DTD, JAVA and so on)
If you are using a PC with the same exact software your code will work perfectly on PC and MAC browsers. ( for this i didnt do anything except make the SRC document 20 pix smaller)
and it worked fine on all browsers)
Im sad to say Macs arnt perfect after all.