View Full Version : scrollbar??

Sep 4th, 2004, 08:00 PM
If I use this code:

<iframe src="http://www.yahoo.com" width="700" height="500" frameborder="0" allowtransparency="true" scrolling="no"></iframe>

and just wanted 1 scrollbar (the one on the right) because the background makes the page width wider then I want it, and I don't want people scrolling over to nothing, what do I do???

Sep 4th, 2004, 09:33 PM
So are you saying that the background image makes the iframe longer than the content which fills the frame? I don't understand; if it's a background image, then it's only as high or wide as the content, right?

I don't quite understand what you're asking, but what if...

<iframe src="http://www.yahoo.com" width="700" height="500" frameborder="0" allowtransparency="true" scrolling="no" id="yahoo_frame"></iframe>

with CSS of

background: #999999 url(image.jpg) top left no-repeat;

Set the background with CSS and then you can decide when and where it repeats. Does that address your problem?

Sep 4th, 2004, 11:04 PM
Does it have to be an iframe, or can it be content that's just plopped onto the page (not someone elses webpage)? And I'd watch out if you're really loading yahoo in an iframe, that'll irk them something fierce...I'd watch that.

Sep 6th, 2004, 01:37 AM
So are you saying that the background image makes the iframe longer than the content which fills the frame?

yes! but I still have to have the right scrollbar!!! and NO bottom scrollbar! :D

Sep 6th, 2004, 02:29 AM
For the background image to make the content area bigger doesn't make any sense to me. Can you give a link to what you've done so far?

Sep 6th, 2004, 03:24 AM
The background image shouldn't make the page scroll in any browser, new (Firefox) or ancient (IE3)! If it is too big, then the image should be clipped rather than making the content area bigger. If it is too small, then it should be tiled (unless you specifically tell the browser to not repeat) rather than making the content area bigger or smaller. Only content in the foreground should make content bigger. A link would be much appreciated.

Sep 6th, 2004, 10:50 PM
ok, say I wanted to use this code:

<iframe FRAMEBORDER="0" width=600 height=400 src="http://www.yahoo.com" scrolling="yes"
name=navigation allowtransparency="true"></iframe>

see how you have to scroll over to see the rest of the page, what do I ad to this code to "crop" the iframe so you can just use the right scrollbar? so if the page in the iframe is: "width=610 height=400" and the iframe window is: "width=600 height=400", what do I do to disable JUST THE RIGHT scroll bar? :confused: :)

Sep 7th, 2004, 01:09 AM
Make the width of the iframe bigger.

Sep 7th, 2004, 03:04 PM
<iframe style="overflow-y: hidden;"></iframe>

Sep 7th, 2004, 03:47 PM
overflow-x and overflow-y are IE only (I recently found this out).

Search the page for "overflow-x"

Sep 7th, 2004, 05:59 PM
So how would I ad it? I tryed this:

<iframe style="overflow-y: hidden;" FRAMEBORDER="0" width=600 height=400 src="http://www.yahoo.com" name=navigation allowtransparency="true"></iframe>

but it's still not working!! :confused:

Sep 7th, 2004, 09:33 PM
I'm having a similar problem, the content in an Iframe is a series of pages all set to 40 pixels less than the size of the Iframe itself, yet still I get a horizontal scrollbar that has the tiniest level of movement possible... as if the window were 1 pixel too wide or something. I even tried setting the inner content to 100 pixels smaller than the Iframe, and still it came up - so I want to hide the overflow. I would prefer a cross-browser solution... any suggestions?

Sep 8th, 2004, 06:29 PM
PLEASE I need to know this code or else my site can't go up!!! :( :(

Sep 8th, 2004, 06:46 PM
bratzman, I'll try to help you some - the overflow-y: hidden goes in the html of the page you load into the iframe, not the code for the iframe itself. something like this:

body {
overflow-y: hidden;

overflow-y gets rid of the vertical (up/down) scrollbar, overflow-x gets rid of the horizontal (left-right) scrollbar. To get rid of both, just use overflow: hidden (no -y or -x).

However, that only works for IE as stated above.

Sep 8th, 2004, 07:06 PM
So what would the html code for the iframe be? I think mine is wrong! and I'm useing yahoo geocities page builder so how would I do this?

heres the test page:


Sep 8th, 2004, 07:20 PM
This is formatted incorrectly, see the code below.

<body bgcolor="#FFFFFF" link="#0000FF" vlink="#FF0000" text="#000000" {overflow-x: hidden;}

Should read:

<body bgcolor="#FFFFFF" link="#0000FF" vlink="#FF0000" text="#000000" style="overflow-y:hidden;"

Or in your style sheet for 01.html:

body { overflow-y:hidden; }

Sep 9th, 2004, 12:24 AM
YAY IT WORKED!!! Thank you SO SO SO SO much!!! :D :D :D