Page 1 of 1

That damn IE again

Posted: Thu Sep 08, 2005 2:03 pm
by MarK (CZ)
Here I am having problems with IE again.
FireFox puts the layout right but IE puts it strangely (depending on the content of some cells).
Here's my code:

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>title</title>
  <style type='text/css'>
body {
  background-color: rgb(  0,  0,  0);
  margin: 0px;
  color: rgb(170,170,170);
  text-align: center;
  font-size: 0pt;
}

table {
  border-collapse: collapse;
  font-family: sans-serif;
  font-size: 10pt;
}

td.standard {
  text-align: left;
  vertical-align: top;
  padding: 10px;
}

img {
  border-width: 0px;
}

#maintable {
  background-color: rgb(  0,  0,  0);
  width:  100%;
  height: 100%;
  border: red solid 0px;
  font-size: 10pt;
}
#maintable TD {
  /*border: red solid 1px;*/
}

 #m_header {
   height: 120px;
   background-image: url('images/bg-header.jpg');
   background-repeat: no-repeat;
   background-position: 40% top;
 }
 
 #m_menu {
   height: 30px;
   background-image: url('images/bg-header.jpg');
   background-repeat: no-repeat;
   background-position: 40% -120px;
   text-align: center;
   cursor: default;
   padding-left: 25px;
   padding-right: 200px;
 }

 #m_left {
   width: 25px;
 }

 #m_main {
   background-color: rgb( 40, 40, 45);
   border: rgb(130,130,130) solid 1px;
   font-size: 10pt;
   text-align: center;
   vertical-align: top;
 }

 #m_right1 {
   width: 200px;
 }

 #m_right2 {
   width: 200px;
   height: 220px;
   text-align: center;
   vertical-align: middle;
 }

 #m_footer {
   height: 30px;
   text-align: center;
   font-weight: bold;
   font-size: 8pt;
 }
  </style>
 </head>
 <body>
  <table id='maintable'>
   <tr>
    <td colspan='3' id='m_header'></td>
   </tr>
   <tr>
    <td colspan='3' id='m_menu'>12345</td>
   </tr>
   <tr>
    <td rowspan='2' id='m_left'></td>
    <td rowspan='2' id='m_main'></td>
    <td rowspan='1' id='m_right1'></td>
   </tr>
   <tr>
    <td rowspan='1' id='m_right2'></td>
   </tr>
   <tr>
    <td colspan='3' id='m_footer'>by <a href='/projects/m2006/index.php?section=contact'>MarK</a> &nbsp; | &nbsp; &copy; 2005, MarK</td>
   </tr>
  </table>
 </body>
</html>
Now, if you try this html in both IE and FireFox, you'll notice the difference. Strangely enough, if you remove the '12345' string from 'm_menu' (or reduce it to just eg. '1'), IE shows it well!
Could anyone please give me some advice (NO 'don't use IE'-style help)? Thanks in advance!