Is there an ideal table measurement

A

Alan

Is there an recommended ideal width measurement that can be set as a
default table size that will be viewable on most monitor without the sides
of the page going off screen please. I would like the length of the table
to be able to grow as the page content developes.
 
N

Nicholas Savalas - http://savalas.tv

Do not set the size of any <table>, <tr>, <td>, <div>, and dont use
margins in <body> tags either - the use of width is an illegal
specification under the html outlines set forth by the W3C. In lay
terms, that means what you see in IE, a visitor might (probably will)
see differently in FireFox, Opera, Netscape, etc. Want to check your
site for conformance? Try http://validator.w3.org/ - if you pass there,
you are good to go. Use stylesheets (.css) for creating classes, and
then call the class in your code, like this (this is only an example,
and specifies only "HTML 4.01 Transitional" compliance; there are many
other ways to go):
--------------------------------
style.css
-------------------------------

body
{
background-color: #FFFFFF;
color: #000000;
font-family: Arial, Helvetica, sans-serif;
font-size: 10pt;
margin: 14px;
}
a:link {color: #0000FF;background-color: #FFFFFF;}
a:hover {color: #0033CC;background-color: #FFFFFF;}
a:visited {color: #0000FF;background-color: #FFFFFF;}
a:visited:hover {color: #0033CC;background-color: #FFFFFF;}
..custom_table
{
background-image: url(table_background.jpg');
width: 100%;
height: 200px;
padding-top: 5px;
padding-left: 8px;
padding-left: 8px;
padding-bottom: 4px;
}

----------------------------------
and the page that uses it - say, index.htm:
----------------------------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html dir="ltr" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<title>example.com</title>
<meta name="description" content="example.com - an example.">
<meta name="keywords" content="example, test, whatever">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
<table class="custom_table">
<tr>
<td>
Welcome to Example.com
</td>
</tr>
</table>
</body>
</html>

-----------------------------
See how the we invented the class ".custom_table" in the style.css
file, referred to the style.css file <link rel="stylesheet"
href="style.css" type="text/css"> in the head of our index.htm page,
and then called the class <table class="custom_table"> in the code of
that page?
Now, everybody enjoys your site because every browser displays nearly
the same output. You are fully W3C compliant. You are loved by surfers,
envied by webmasters. There is a new spring in your step; life is good
again. Good luck, Alan..

Nicholas Savalas - http://savalas.tv
----------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top