Mock tests, Interview questions, Tutorials and Tech news
 
 

Archive

Posts Tagged ‘ie 7’

IE7 ignores table width

August 23rd, 2010 Vinay 2 comments

There has been a problem in using table width in IE7.

The pre tags in IE 7 do wrap the text but the table width will remain wider and scrollbar appears, as if the text is taking full space. This problem doesn’t come in Firefox and Chrome. Can anyone help me out defining proper style for IE 7 for pre tags. for eg of you look at this code


You would not face this problem in Firefox or IE8.  It only happens with IE.

Solution : Use  table-layout: fixed;

If you apply the table-layout:fixed style for the inner table, where the data is in different columns, all columns get same area irrespective of their defined width.  But if applied it to the outer table, and it works fine.

Categories: Programming / tutorials Tags: , ,
Get Adobe Flash playerPlugin by wpburn.com wordpress themes