Reply to Re: Using CSS instead of tables - great idea but how??

Your name:

Reply:


Posted by chrisn on 08/11/05 17:20

Ding,

Thank you for your help. Setting the width to 90% or 95% looks fine,
but doesn't allow me to set the margin width at 10 pixels, which would
make this page inconsistent with the rest of the application. However,
your assistance has led me to a solution which works.

Wrapping the table in a DIV and setting the padding to 10px works when
I change the doctype to

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

The use of the DIV for layout is still a little less than desirable,
but I figure still better than the table which it replaces.

I didn't think I would be able to do this (use the strict mode) as some
users were thought to be on IE5.1, however, it turns out they are all
running IE 6 now.

The full code (for anyone who's interested, you never know) is...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<style>
body {margin:0px;}
table {width:100%;border:1px solid silver;}
td {border:1px solid silver;}
div#Header {background-color:silver;height:40px;}
div#Container {padding:10px;}
</style>
</head>
<body>
<div id="Header">...div which will contain the header
controls...</div>
<div id="Container">
<table>
<tr><td>table</td><td>of</td></tr>
<tr><td>data</td><td>...</td></tr>
</table>
</div>
</body>
</html>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация