Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Iframe in table problem? 1

Status
Not open for further replies.

darkprince

Programmer
Jun 4, 2002
165
AU
Hello

Below is the setup for my page and the problem is that I have an iframe frame in the middle cell and it takes out the right cell in the table and makes the left one wider that it should be.

If you take out the iframe code then it goes the way it should be. Can I make it so the table is right with the iframe still in it?

Thanks in advance
Ciao












<html>
<head><title>Title</title></head>

<style>
A:link {COLOR: #ffffff; TEXT-DECORATION: none}
A:visited {COLOR: #ffffff; TEXT-DECORATION: none}
A:hover {COLOR: #000000; TEXT-DECORATION: none}
A:active {COLOR: #ffffff; TEXT-DECORATION: none}

BODY {
SCROLLBAR-FACE-COLOR: #E1DDDC; FONT-SIZE: 10px; SCROLLBAR-HIGHLIGHT-COLOR: #808080; SCROLLBAR-SHADOW-COLOR: #808080; SCROLLBAR-3DLIGHT-COLOR: #808080; SCROLLBAR-ARROW-COLOR: 808080; SCROLLBAR-TRACK-COLOR: #c0c0c0; FONT-FAMILY: arial, helvetica, sans-serif; SCROLLBAR-DARKSHADOW-COLOR: #135184; BACKGROUND-COLOR: #ffffff

</style>


<body leftMargin=0 rightMargin=0 topMargin=0 bottomMargin=0 marginwidth=0 marginheight=0 text=&quot;#ffffff&quot;>
<div align=&quot;center&quot;>





<table border=&quot;1&quot; height=&quot;600&quot; width=&quot;783&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; bordercolor=&quot;#386AD0&quot; class=&quot;box&quot;>
<tr>

<td width=&quot;126&quot; valign=&quot;top&quot; background=&quot;leftbg.jpg&quot;><font face=&quot;tahoma&quot; size=&quot;1&quot;>

Text

</td>
<td align=&quot;center&quot; valign=&quot;top&quot; bgcolor=&quot;#E1DDDC&quot; width=&quot;531&quot;>

<iframe name=&quot;iframe&quot; src=&quot;news.html&quot; width=&quot;500&quot; height=&quot;400&quot; frameborder=&quot;1&quot;>

</td>
<td align=&quot;right&quot; valign=&quot;top&quot; background=&quot;rightbg.jpg&quot; width=&quot;126&quot;><font face=&quot;tahoma&quot; size=&quot;1&quot;>

Text

</td>
</tr>
</table>
</div>





</body>
</html>
 
Hi,

You have several problems here with that code:

- your css links are not in the correct order (link, active, visted, hover)(yes that makes a difference)
- organize your custom scrollbar stuff together and your font stuff together
- you are missing the last ;} at the end of your CSS stylesheet
- always put your closing </td>'s directly after the cell content so as not to get an unwanted space below the content
- you have opened your <iframe> but have not closed it </iframe>

Your iframe problem is due to not closing the iframe tag

Hope this helps!
relax.gif

 
Hey

Oh man thanks so much can't believe I forgot that.

I remember doing that when I first learnt iframe like 3 months ago then I left iframe and then 3 months lata I used it again but in that layout I didn't have a right bar so I didn't encounter this problem.

So thanks heaps again, can't remember how many times you've helped me out

Cheerio
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top