Stretch the width of the table to fit the web browser

I searched the Internet for a long time, trying to solve my problem. I have a spreadsheet with my entire site and would like it to stretch to fit the size of the user's web browser. Here is the site 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 useful solutions are welcome.

+4
source share
3 answers

Specify the percentage width in the <table> and <TD> tags. This will be set according to the size of the browser window. Give 100% to <table> and the corresponding percentages to each <TD>

+3
source
 <style type="text/css"> * { margin: 0px; padding: 0px; } html, body { height: 100%; } </style> <table style="width:100%;height:100%;"> <!-- content --> </table> 

This ensures that the table will stretch to the size of your browser.

http://jsfiddle.net/L9wMU/

+1
source

I am surprised that there are already three answers to this question!
Well, first of all, the guy noted the question of dreamweaver using My Images in src and using tables! This means that the real help he needs is to learn the basics of HTML and CSS!

What I offer is a search for resources to learn the basics, and if you cannot find it, ask for it here! how does this sound?:-)

And for you guys (who answered) even changing the width of td by a percentage will not fix its problem, since img will stretch to full width! so it will be ~ 2044px! which is wider than most screen resolutions!

+1
source

Source: https://habr.com/ru/post/1334802/


All Articles