Sunday, November 29, 2009

Trouble stretching table length 100% in IE, works in Firefox?

Basically what I want to do is have the menu links at the top of the table, and then the table streching 100% (as long as that page may be) and displaying a picture at the bottom of the table.



This works in firefox, but not in IE. Any ideas?



%26lt;td class="style2" style="width: 13%; height: 100%" align="top"%26gt;



%26lt;table style="width: 100%; height:100%" cellspacing="0" cellpadding="0" bgcolor="#96C2EF"%26gt;



%26lt;tr%26gt;



%26lt;td valign="top" style="width: 104px"%26gt;



%26lt;table cellspacing="0" cellpadding="4" align="center"%26gt;



%26lt;tr%26gt;



%26lt;td valign="top"%26gt;Home



%26lt;a href="detail.htm"%26gt;The Cottage%26lt;/a%26gt;



%26lt;a href="contact.htm"%26gt;Contact Us%26lt;/a%26gt;%26lt;/td%26gt;



%26lt;/tr%26gt;



%26lt;/table%26gt;



%26lt;/td%26gt;



%26lt;/tr%26gt;



%26lt;tr%26gt;



%26lt;td valign="bottom" style="width: 104px"%26gt;



%26lt;img alt="" src="menu.jpg" width="104" height="270" /%26gt;%26lt;/td%26gt;



%26lt;/tr%26gt;



%26lt;/table%26gt;



%26lt;/td%26gt;



Trouble stretching table length 100% in IE, works in Firefox?windows explorer





I'm not sure why you have the table inside the TD tags... maybe its an embedded table. But either way, as long as the outermost table or cell is set to 100% thats what you need.



But you should also add some CSS style code that removes any padding or margins that IE or other browsers may automatically insert into every HTML page. Because that may be making it seem like your table is not a full 100%, but is intead more like 95%. Just google search "css style padding" or margin, and you'll find the code.



Trouble stretching table length 100% in IE, works in Firefox?microsoft zune internet explorer



Since the outermost element you have listed here is a TD, do you have the width set for the table that contains it? That should be set to 100%.

No comments:

Post a Comment

 
shared web hosting