View Full Version : Positioning Iframes


afireoutisde
07-05-2003, 04:37 AM
I'm very new to iframes, and I decided to put them in a website that i was going to create. Positioning one iframe was really easy, but once i put my second when in there, everything started messing up. I've looked throughout this board and through many tutorials to find the answer to my problem, but i just can't find anything! My codes are really messed up right now. Please help!

My site is http://sporkedpineapple.tripod.com/idontknow.html

Dude128
07-05-2003, 04:43 AM
it looks like your code could use some cleaning up.

first of all, I don't see the need to have an entire CSS class to define the positioning for each iframe. you could just add a style attribute to the <iframe> tag that specifies your numbers and such. and what seems to be causing your problem is that you have two CSS sections with different positions but with the same name. each item should have a unique identifier so that the browser can determine which one you're talking about.

see if that helps you any to guide you in the right direction. if not, feel free to ask about anything that's causing you trouble :)

afireoutisde
07-05-2003, 06:30 AM
Alright, I didn't fully understand everything you wrote (because i'm a newbie), but from what i understand, i don't need the css at all. I took that out, and once again everything moved, but not in a good way. I'm probably missing something painfully obvious here, but I'm just not getting it!

My code now looks like this:

<div id="inlineframe" style="position: absolute; left: 165px; top: 105px;">
<iframe width=370 height=180 src="iframe1.html" align=left hspace=10 vspace=10 frameborder=0 style="position: absolute; left: 350px; top: 11px;">
If you can see this, your browser does not support iframes!
</iframe>
</div>

Both of the iframes' codes look like this except the src is different.

Do I even need the <div> part?

I'm sorry for being a pain for asking all these questions, but i would really appreciate some help. And thank you, Dude128, for trying to explain things to me.

ChibiKitty
07-05-2003, 11:30 PM
No, you don't need the 'div' I just checked out my page html just for you to see how I did it and my code looks like this:

<iframe FRAMEBORDER="0" BORDER=0 width=294 height=274 src="YOUR PAGE" name="Content" style="position:absolute; left:290; top:50" scrolling=auto>
</iframe>

As you know you can get rid of whatever or add whatever you want.

afireoutisde
07-06-2003, 01:18 AM
Thank you so much! I finally understand this now! I don't know why i had those other codes. And for anyone who is trying to learn about iframes, i don't recommend that you use the tripod tutorial to learn. It's confusing and I ended up wasting a couple of hours because of it.