Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tables - Expanding Hortizontally??? 2

Status
Not open for further replies.

jrome007

Programmer
Dec 10, 2003
11
US
Hey Everyone,

I’m trying to create a web page using a table, however I can’t get the table to appear 100% horizontally across the screen, like I’ve seen on other sites (I know they use tables because I’ve viewed their source file. Here is an example of the simple table.

Thanks,

- jrome_007

____

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<table width="100%" border="1" cellspacing="0" cellpadding="0" height="300" align="left" bgcolor="blue" >
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>

</body>
</html>
 
I suppose you have small margins on all the sides of the table. You can solve that by removing the padding and margin from the body:
Code:
<style type="text/css">
 body {
  margin: 0;
  padding: 0;
 }
</style>
Add this inside the <head> of the document or put it inline:
Code:
<body style="margin: 0; padding: 0;">
 
Thanks Everyone for all your valuable input!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top