Warning: include(http://www.studio6000.com/header.htm) [function.include]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/studio60/public_html/html/lesson15b.php on line 12

Warning: include() [function.include]: Failed opening 'http://www.studio6000.com/header.htm' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/studio60/public_html/html/lesson15b.php on line 12

Warning: include(http://www.studio6000.com/tutorside.htm) [function.include]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/studio60/public_html/html/lesson15b.php on line 17

Warning: include() [function.include]: Failed opening 'http://www.studio6000.com/tutorside.htm' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/studio60/public_html/html/lesson15b.php on line 17
 

Changing the width of a table

Perhaps you wouldn't like the table to take up the whole width of the browser window.  Say you only wanted to take up 50% of the browser window.

To make things a little less crowed let's go back to our first  table example and let's add the width attribute.

<body><table width="50%" border="1">
<tr>
<td>Text1 </td>
</tr>
</table></body>

The result would be:
Text1

As you can see the table has now reduced in half and only takes up half the width of the browser. Keep in mind that by using a percent value the table will take up 50% of the browser window.  Therefore it may look very different in two different browsers. 

To make things more exact you can measure the width of the table by using pixels.  To do this, simply leave out the percent sign, like so:

<body><table width="100" border="1">
<tr>
<td>Text1 </td>
</tr>
</table></body>

Now the table will look like this:

Text1

You can also set the height of a table, like so:

<body><table width="100" height="100" border="1">
<tr>
<td>Text1 </td>
</tr>
</table></body>

Now the table will look like this:

Text1

Next Lesson


Warning: include(http://www.studio6000.com/footer.htm) [function.include]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/studio60/public_html/html/lesson15b.php on line 102

Warning: include() [function.include]: Failed opening 'http://www.studio6000.com/footer.htm' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/studio60/public_html/html/lesson15b.php on line 102