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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tables 100%

Status
Not open for further replies.

nchan

Programmer
Jan 9, 2001
40
CA
this page is called in an iframe. And I have javascript random background changer on the page. It works in Netscape and Firefox. The center cell remains in the center with white on both sides.

My table has three cells.
table bgcolor="#FFFFFF"
<td width="100%">&nbsp;</td>
<td> width="700">big picture</td>
<td width="100%">&nbsp;</td>



But in IE the last cell (right side) doesn't expand fully.
Suggestions pls.

Thanks kindly.
R
 
you are missing a <tr>. When a <tr> is coded, 2 <td>s at 100% would not have any meaning.

It would be a good idea to reduce the problem to its essence. For instance, is the iframe even relevant? Does the same thing happen when the page is not in an iframe. Is the background changer relevant? Remove it and see. etc.

Clive
 
What you would want to use, if you REALLY want to use a table, is the following:

Code:
<table style="width: 100%;"><tr>
  <td></td>
  <td style="width: 700px;">big picture</td>
  <td></td>
</tr></table>

*cLFlaVA
----------------------------
[tt]tastes great, less filling.[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
CliveC/*cLFlaVA

I give it a try.
Thanks for the quick replies!!!
 
CliveC
>For instance, is the iframe even relevant? Does the same thing happen when the page is not in an iframe. Is the background changer relevant? Remove it and see. etc.<

I have broken down and rebuilt the page as suggested. Everything works in pieces. The 3 celled page works on its own, but when called in the iframe the right cell doesn't expand. ??

cLFlaVA
>style="width:<

Yes! This does work in Netscape and FireFox but not in IE. It still remains as the right cell does not expand within the iframe.

I am using <div align="center"> on that table page.

Vragabond
>style='table-layout:fixed'
<col width=100%>
<col width=698>
<col width=100%>
<

All 3 cells are of equal size. Hmmm.

Since alot of people are IE dependant I need to find a solution to this glitch.

The big picture is actually an <object> flash .swf so it does work by itself and in Netscape and Firefox. Just IE :p


 
Do you really need this in a table?

Why not do something like this:

Code:
<style type="text/css">
#wrapper {
    background-color: #fff;
    /* for ie */
    text-align: center;
}

#content {
    width: 700px;
    /* for smart browsers */
    margin: 0 auto;
}
</style>


<div id="wrapper">
  <div id="content">big picture</div>
</div>

*cLFlaVA
----------------------------
[tt]tastes great, less filling.[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
CliveC
<iframe src="directory/file.html" align="center" marginheight="0" name="x" frameborder="0" width="100%" height="455">sorry, your browser doesn't support iframes. </iframe>
cLFlaVA
>do you really need this in a table
'cept I need 80px space above the big pic. It works if I add a spacer.gif. But alias it has the same prob in an iframe. There is a space to the right of the pic.

I had another look at this stuff this morning at all the pieces in-the-iframe, out-of-the-iframe and pinpointed the problem to be the table border=1. It displays fine with the border. But I don't want a border showing. Take the border off and it leaves a space to the right side. ??????
cLFlaVA, I'm not sure where to add the border on in the code as I'm self taught with all of this and started CSS a few months ago.

I'm looking to post the files up if anyone is interested in looking further. Will let you know when its up.

Thanks for now.

 
I am perplexed. The problem only exists using Internet Explorer.

I have uploaded the files to my site, and its still misbehaving. And then I create a site on 'geocities' it pops up an ad thingamajig on the right side within the iframe and on minimizing it ... wouldn't you know, the page displays correctly. Does the java has anything to do with that?
:)
Hmmmm.....
thanks
 
Ah Ha! Got It!
CliveC
Thank you for your initial suggestion to reduce the problem to its essence

*cLFlaVa
Thank you for your suggestion to toss the table

The solution was to create a page for the javascript background change with an Iframe width="100%".
Now it works in the 3 browsers I use for testing.

Have a great weekend!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top