Stretching a Table's Width to fit web browser

Techn0guy picture Techn0guy · Jan 9, 2011 · Viewed 47.9k times · Source

I have scoured the internet for a long time trying to solve my problem. I have a table with my whole site in it and would like for it to stretch to fit the user's web browser size. Here is all the site's code:

<body>

<table width="100%" border="0">
  <tr>
    <td width="525" rowspan="2"><img src="My Images/Speaker.png" width="525" height="772"               
ondragstart="return false" />
    </td>

    <td width="697" height="16">
    *Flash Video Here*
    </td>
   </tr>
  <tr>
    <td><img src="My Images/Vymil.jpg" width="822" height="597" ondragstart="return false"/></td>
  </tr>
</table>

</body>
</html>

Any helpful solutions would be greatly appreciated.

Answer

Harry Joy picture Harry Joy · Jan 9, 2011

Give width in Percentage in <table> and <TD> tag. This it will set as per browser window size. Give 100% in <table> and appropriate percentages to every <TD>