Nov 25, 2009

iframe question

free web hosting
Open Discussion & Free Web Hosting > Computers & Tech > Designing > Web Design and HTML

iframe question

suicide
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?

Comment/Reply (w/o sign-up)

overture
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.

Comment/Reply (w/o sign-up)

kc8yff
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

Comment/Reply (w/o sign-up)

antitoxic
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.

Comment/Reply (w/o sign-up)

marijnnn
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:
CODE
<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

CODE
<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

 

 

 


Comment/Reply (w/o sign-up)

godschicken
Macromedia Dreamweaver MX 2004 is the best way to work with scrollbars and iframes. It has everything you need.

Comment/Reply (w/o sign-up)

antitoxic
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?!

Comment/Reply (w/o sign-up)

marijnnn
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

Comment/Reply (w/o sign-up)


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)


See Also,

*SIMILAR VIDEOS*
Searching Video's for iframe, question
advertisement



iframe question

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com