Web Hosting Talk







View Full Version : Iframe, cell, and backgrounds


FW-Mike
05-28-2003, 08:49 PM
I've got an iframe in a cell


<td width="505" valign="top"><IFRAME name="main" id="main" align="center" width="100%" height="100%" scrolling="auto" framespacing="0" frameborder="no" MARGINWIDTH=0 MARGINHEIGHT=0 background="images/framebg.jpg" SRC="content.php?page=<?php echo $_GET["page"]; ?>">
This site uses Iframes however your browser doesn't support it. Go <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=1e1550cb-5e5d-48f5-b02b-20b602228de6&displaylang=en">here</a>
to get MSIE 6. This will allow you to view our content!</IFRAME> </td>


The topline of content


<table width="467" border="0" cellpadding="0" cellspacing="0">


I want to set the background of the cell to be a the file images/framebg.jpg and to span the width of the cell and then have the iframe have a sort-of transparent bg so that it only shows the background of the cell. The big thing is that I dont want the image in the cell to span vertically only horizontally and I want it to go all the way to the scroll bar of the iframe. Help me out, please!

Mike

Rich2k
05-29-2003, 04:39 AM
Sorry I don't quite get what your trying to do... surely how the background is displayed is only dependent on the size of image?

X-TechMedia
05-29-2003, 05:03 AM
If you want the iframe to have a transparent background, try putting this in the <iframe> tag: style="filter:Alpha(opacity=60);"

Im not sure if this is what you are trying to do, but on one of my sites I have an iframe with transparent backgrounds.
Brain-Freeze (http://www.brain-freeze.co.uk/content/en/KCUF.php)
Don't know if this will help at all!

Rich2k
05-29-2003, 08:01 AM
That will only work on IE5.5+ on Windows

You should use allowtransparency=true

X-TechMedia
05-29-2003, 12:10 PM
i didnt know that!
Ill make some changes in my code as well! :)

FW-Mike
05-29-2003, 08:02 PM
Hmm I still can't get it. Right now I have


<td width="505" valign="top" background="images/framebg.jpg"> <IFRAME allowtransparency="true" width="100%" scrolling="yes" height="404" frameborder="0" marginheight="0" marginwidth="0" vspace="0" hspace="0" SRC="content.php?page=">
This site uses Iframes however your browser doesn't support it. Go <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=1e1550cb-5e5d-48f5-b02b-20b602228de6&displaylang=en">here</a>
to get MSIE 6. This will allow you to view our content!</IFRAME>


and the background is still just white in the iframe however it's the image does show the little space left just underneath the iframe thats left in the cell. What did I do wrong?

X-TechMedia
05-30-2003, 04:04 AM
I don't know if it will help, but it seems to me that if I out the closing </td> on the same line as the </iframe> then there are no spaces, but if its on say the next line down, i always get spaces with images