actually, hiding the width settings in the CSS did not work, as I have already experimented with this. IE6 still has this issue on setting the width of a TD.
Second off, Using Div's instead of tables is very unsafe for css/javascript between browser types. I recently did a lot of work for porsche trying to clean up these issues.
I tend to stay away from Div's because of all those issues. As you will notice, the very same site we are posting our content to at this moment is running off of tables to designate content positioning.
I am more looking for an answer that may explain why such a simple table is not working in IE's version 6 browser.
Main Topics
Browse All Topics





by: JohnModigPosted on 2005-12-10 at 19:13:36ID: 15460847
Hi hpdvs2. articles/d octype/ Next, to be in line with the current standards, I strongly advice you to not use tables for layout. A few reasons why: http://phrogz.net/CSS/WhyT ablesAreBa dForLayout .html Today, the standards leans towards using semantic correct HTLM and CSS. This means: spearate content from presentation. Why? The primary reason for having a web site is to deliver content to your customer. In addition to the never ending browser wars, today you have a wide variety of devices connecting to your web page. CSS layout allows you to deliver content intelligently to any number of devices. A proper CSS layout will benefit your site users because:
---------- 4/loose.dt d">
----------
Your document is not excatly well-formed. First of all - to make it look the same in different browsers you need to start your code with a DOCTYPE: http://www.alistapart.com/
- Files will download faster (less code, no overall tables, valid code)
- Content is accessible to wider range of users (normal users, blind users, vision impaired users, dislexic users, motor skill impaired users etc)
- Content is accessible to wider range of devices (screen readers, browsers, text based browsers, hand helds, search robots, printers, fridges etc)
- Allows users to customize site appearance (style switchers)
- Provides print friendly versions for all pages
- Websites will be easier to work with for multiple developers (cleaner code, easier to understand)
So, to make a site similar to your example using above standards, the code will look something like this:
--------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title>Layout test</title>
<style type="text/css" title="currentStyle" media="all">
body {
margin: 0px;
font: small verdana;
color: #000;
}
#menu {
float: left;
position: relative;
width: 100px;
height: 500px;
background-color: #0000FF;
}
#main {
position: relative;
width: auto;
height: auto;
}
#footer {
clear: both;
position: relative;
width: auto;
height: auto;
}
</style>
</head>
<body>
<div id="menu">
Menu
</div>
<div id="main">
Hello World!
</div>
<div id="footer">
Footer
</div>
</body>
</html>
--------------------------
As you can see, it is all in the CSS. And then I am sure 100px will work :)
Regards,
John