View Full Version : iframe & positioning problem


Reeebeckah
05-31-2005, 05:33 AM
I need help getting my index code to have the image as the background with positioning for the main body and the right side news section, what did I do wrong with the below code for my index page?:

<div style="position: relative; left: 30px; top: 55px; height: 315px; width: 400px;"><IFRAME name="body" src="home.html" width=400 height=315 marginwidth=0 marginheight=0 frameborder=0 scrolling=auto></IFRAME></div>
<div style="position: relative; left: 440px; top: 50px; height: 295px; width: 200px;><IFRAME name="news" src="news.html" width=200 height=295 marginwidth=0 marginheight=0 frameborder=0 scrolling=auto></IFRAME></div>
<center><img src="http://www.geocities.com/simlishmall/storetest1.gif">

any help would be appreciated!
-Rebeckah


*** edit ***

Okay I've changed the code to be as follows:
<body bgcolor=E6ECFF>
<IFRAME name="body" src="home.html" width=400 height=315; scrolling=auto; position:absolute; left:300px; top:55px;"></IFRAME>
<IFRAME name="news" src="news.html" width=200 height=295; scrolling=auto position:absolute; left:440px; top:50px;"></IFRAME>
<center><img src="http://www.geocities.com/simlishmall/storetest1.gif">
but why isn't it overlapping my image? I haven't messed with layers and such for years so I can't figuire it out, any ideas?
-Rebeckah
check out the problem: http://www.geocities.com/simlishmall

Reeebeckah
05-31-2005, 05:53 AM
I updated my code to be:
<center><img src="http://www.geocities.com/simlishmall/storetest1.gif">
<div style="position: absolute; left: 30px; top: 55px; height: 315px; width: 400px;"><IFRAME name="body" src="home.html" width=400 height=315 marginwidth=0 marginheight=0 frameborder=0 scrolling=auto></IFRAME></div>
<div style="position: absolute; left: 440px; top: 50px; height: 295px; width: 200px;><IFRAME name="news" src="news.html" width=200 height=295 marginwidth=0 marginheight=0 frameborder=0 scrolling=auto></IFRAME></div>

but my question now is how can i get it to where the body text goes over the main body and the other frame appears under the news section?
here's a link to my site: http://www.geocities.com/simlishmall
any help would rock
-Rebeckah

Reeebeckah
05-31-2005, 06:29 AM
Okay I've changed the code to be as follows:
<body bgcolor=E6ECFF>
<IFRAME name="body" src="home.html" width=400 height=315; scrolling=auto; position:absolute; left:300px; top:55px;"></IFRAME>
<IFRAME name="news" src="news.html" width=200 height=295; scrolling=auto position:absolute; left:440px; top:50px;"></IFRAME>
<center><img src="http://www.geocities.com/simlishmall/storetest1.gif">
but why isn't it overlapping my image? I haven't messed with layers and such for years so I can't figuire it out, any ideas?
-Rebeckah
check out the problem: www.geocities.com/simlishmall

Reeebeckah
05-31-2005, 09:28 AM
No help or ideas how to fix this problem?
-Rebeckah

pb&j
05-31-2005, 01:56 PM
please be patient. some of use live on the other side of the planet and havent seen your question yet.
try something like this...

<html>
<head>
<title> test page </title>
<body bgcolor="#E6ECFF">

<IFRAME name="body" src="home.html" width="400" height="315" style="position:absolute; left:300px; top:55px;"></IFRAME>

<IFRAME name="news" src="news.html" width="200" height="295" style="position:absolute; left:440px; top:50px;"></IFRAME>

<center><img src="http://www.geocities.com/simlishmall/storetest1.gif" height="450" width="646">

</body>
</html>

a word of advice... use positioning to set your image into place as well. CENTER and css positioned stuff does not mix well. in different browsers and resolutions, they will appear off one way or another.

Reeebeckah
05-31-2005, 07:54 PM
Thanks but I have one more question. How can I use positioning for my image so that it stays the same with different browsers and resolutions? I thought relative positioning or maybe it was absolute made it stay the same regardless of browser, I know it has something to do with positioning the image, but I don't know how exactly to do that, any ideas?
Thanks so much for the help again! :-D
-Rebeckah
also I wanted to have a row of 88x31 buttons that marquee and with mouseover slow down at the very bottom, would I just create another iframe but disable the scrollbars to make it work?

pb&j
06-01-2005, 07:32 AM
see the STYLE parts in the IFRAME tags? that can be used in an IMG or DIV tag too. just adjust the values to make things appear on the right spot on your webpage.

it is best to use ABSOLUTE unless you know about RELATIVE and can use it well.

for the marquee... put it into a DIV and postition that too using the STYLE.