Jump to content
xisto Community
Sign in to follow this  
suicide1405241470

iframe question

Recommended Posts

Ok I'm using an iframe to display my content. I have the height set at 100% but it extends far below the height of the screen and creates a scroll bar for the page, something I don't want. Is there a bug with iframes and internet explorer or am I just doing something wrong?

Share this post


Link to post
Share on other sites

It appears to be just you i just tried it and it worked fine for me. Could you post your iframe code? maybe i could then help.

Share this post


Link to post
Share on other sites

I once had that problem.. I had the height set to 1000%. Check if that's what is wrong first.If that is not what is wrong, try setting it to a height in pixels rather than percent. If you're trying to making the frame so that when people with different monitor resolutions can see the frame at full height, then I don't know what to do.If you wouldn't mind, please send me the URL.Good luck.Neil

Share this post


Link to post
Share on other sites

May I ask you something too?!How can I use only vertical scrool bar in the iframe?! I don't want to use horizontal. It's disable. There is nothing to be scrooled by horizontal ??!How can I hide the horizontal scroolbar.

Share this post


Link to post
Share on other sites

ok, to use a horizontal scrollbar: use this body tag for the file that is displayed in your frame. so if you display xxx.html in your iframe, open that file and put this as body tag:

<body style="background-color:transparent; overflow:auto;">
that will make sure that you have automatic wordwrap, the vertical scrollbar will apear when it's needed. ofcourse, when there is a very long word in the text, that's to wide to be displayed in the frame, you'll get a horizontal scrollbar as well.

to disable the horizontal scrollbar, add this to the <head> section of your html document

<script language="JavaScript">document.body.style.overflowX ='hidden';</script>

this will prevent hor. scrollbars, but keep in mint that, when using a too long word, they won't be able to read the rest of the word anymore!
you can do the same for the vertical scrollbars: overflowY='hidden'
but if you want to hide both, you can skip the javascript and just set overflow="hidden" in your body tag

other options for the overflow property in the body tag:
visible: will not show scrollbars, but the text will be diplayed outside your page!
scroll: will always show a scrollbar

Share this post


Link to post
Share on other sites

Ok. 10x that you tell me about the iframe scroolbar.But I want to ask something else: I found a way to change the position of the iframe . I put the iframe in a div layer and I just move the layer. But now I have a problem ..I want to put the iframe into a cell in a table ..The cell is centered in the page but when I put the iframe in that cell the iframe back in the left part of the page and stretch the table cell.How to correct it?!

Share this post


Link to post
Share on other sites

hm, you could try by setting the width of your cell to 10% or something. the iframe will stretch it just enough so it fits.but actually, i don't think you can put an iframe in a cell. like you can't put frames in a cell. just not possible.what you can do is make your iframe appear on top of your cell with the positioning method (div ) i gave in another topic in this part of the forum.but what i find strange: why use an iframe and not put the content directly in the cell of the table

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.