Thread: Iframe Scrollbar
Results 1 to 10 of 10
Related
-
changing the color of scrollbar in an iframe Forum: CSS Forum
Replies: 3 -
Moving the Iframe Scrollbar Forum: HTML Forum
Replies: 1 -
iFrame Scrollbar Issues Forum: CSS Forum
Replies: 11 -
iframe scrollbars dif from browser scrollbar? Forum: HTML Forum
Replies: 5 -
iFrame Scrollbar Forum: HTML Forum
Replies: 1
-
04-15-2004, 01:12 PM #1
Iframe Scrollbar
Hi, I designed the site for an online radio station and I recently converted it to all iFrame content and one php index file that links to different iframes in the "datamain" iframe. In Mozzila, the iframe displays perfect, but in IE it shows a scrollbar that doesnt move because it is set to "scrollbar=yes" because one of the pages is longer than the iframe. However, all of the other pages fit and the useless scrollbar in IE just takes up space and makes it look bad. Is there a way to set it so the scroll bar is only displayed when the content is longer than the iframe? Here is the link to the site so you can see what I'm talking about:
www.1019theedge.com
One more question about "liquid" design. I'd like to set the main table so that my footer image is at the bottom of every screen's view no matter what. I have tried setting the table length to 100% but it never seems to work.
Thanks!
Chris G
-
-
04-16-2004, 07:45 AM #2
scrollbar="yes"?
I think it's scrolling="yes".
scrolling="yes" will give you the outline of a potential scrollbar.
The valid attributes are "yes", "no", and "auto".
Try setting it to "auto". Then the scrollbar will only appear if the content overflows the frame.
-
09-21-2005, 08:08 AM #3
Re: Iframe Scrollbar
heyho.
i have a problem like that. i have designed a website an put a iframe (scrolling is auto) in it. the content of the iframe is not as wide as the iframe, but a scrollbar appears. what is wrong (only in ie, in firefox it is allright)?
<iframe
name=contentFrame
src="appl/index.htm" frameborder=0
width=730 height=550 scrolling="auto"></iframe>
thank you.
-
10-10-2005, 04:53 PM #4
Re: Iframe Scrollbar
Maybe it happens like in a site Im designing now: I want vertical scrolling to be automatic, but horizontal to be always off.
Try this in your CSS:
html {
overflow-x: hidden;
}
But keep the scrolling="auto" in your iframe, like they told you earlier. That way, horizontal scroll will be always off, while the vertical scrolling will be automatic.
Thanks to this board I knew how to color iframe scrollbars, so I thought I could give something back
-
10-16-2005, 01:59 PM #5
Re: Iframe Scrollbar
IE'S MOMENTARY LAPSE OF REASON:
The reason this occurs is because when you set the width of the iframe, the body of the included page inherits that width. So if the iframe has its width set to 400px, the body of the included page has its width set to 400px. This is not a problem unless the height of the page is greater than the height of the iframe. Then, the iframe takes up some of the width to use for the vertical scrollbar. So, the iframe has a width of 400px, but the width of the display box is only about 385px because the vertical scrollbar takes up about 15px. However, the body of the included page is still 400px - even if the included page's content only has a width of 1px. So, you end up with a horizontal scrollbar. Other browsers set the width of the body to the width of the viewable space. IE is retarded.
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;
(<body style="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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
(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.)
-
11-16-2005, 05:00 AM #6
Re: Iframe Scrollbar
elee, you've managed to solve my problems I've had for the last couple of months. I've read a lot of sites but nothing seemed to solve this problem. Thanks so much for this info.
-
12-27-2005, 05:30 PM #7
Re: Iframe Scrollbar
Thanks Candyman! You solved the same problem I had, not with iFrames but with a regular frame which (mis)behaved likewise.
-
06-04-2006, 01:42 PM #8
Re: Iframe Scrollbar
Thanks Elee, for taking the time to post the 3) in the iframe tag, set the attribute:
scrolling="yes" --
This totally fixed my problem.
Greg Beddor -
Last edited by HTML; 06-04-2006 at 01:51 PM. Reason: You may add your signature to profile when enough posts have been reached
-
02-22-2008, 11:48 AM #9
Re: Iframe Scrollbar
Your three ways did not apply for me [IE6]. But there is another solution derived from these:
4) Set <body style="width:98%;"> which also will leave enough space on the right.
Additionally <html style="overflow: auto;"> (in the html page containing the iframe) had to be set to avoid a disabled right scrollbar for XHTML 1.0 Transitional.
To make clear what happens: what we use in the end are the scrollbars attached to the iframe element.
-
12-10-2009, 01:35 AM #10
Iframe target not working
can anybody tell me why the target link not working in http://www.ijexportsinc.com/metal_menu.html
the target frame is in http://www.ijexportsinc.com/index2.html
i want to open the alum.html in FRAME1

Reply With Quote

Site Map -- Is it Necessary
Today, 06:05 AM in Search Engine Optimization - SEO - Forum