When you specify width in perent, then the layout is auto audjusted relatively to the width of the parent container. Here the parent is the BODY which is the entire browser area. So when you reduce the size of the browser window, the width of BODY (the container) also gets reduced and as a result, the TABLE width (which is specified in percentage) is adjusted accordingly.
suppose the TABLE has two columns with widths 30% and 70% respectively
Browser Window Width = 1000px BODY width = 1000px (width of Browser) TABLE first Column width = 300px TABLE second Column width = 700px
Now browser window is re-sized
Browser Window Width = 600px BODY width = 600px (width of Browser) TABLE first Column width = 180px TABLE second Column width = 420px
In order to have the TABLE columns not re-size, you should specify absolute width values. <table width="600px"> <colgroup> <col width="200px" /> <col width="400px" /> </colgroup> </table>
- Badri
|