Internet Explorer table rendering - Browser Compatibility

Posted on 2006-06-08
Last Modified: 2008-01-09

I'm working on my personal site and it's becoming a headache. I created my Photoshop layout and saved it as an HTML file for porting to PHP. Unfortunately, the table renders differently in Firefox (my browser of choice) and in Internet Explorer. A sample of the problem pages can be found at:

In Firefox, the site looks fine. In IE, however, the navigation column shifts down so that the entire table is messed up. I've changed table widths and heights to no avail. I've attached the whole code (aside from javascript):

<BODY onLoad="preloadImages()" bgcolor="#000000" topmargin="0" bottommargin="0">
<!-- ImageReady Slices (DESIGN06.psd) -->
<TABLE align="center" width="850" border="0" cellpadding="0" cellspacing="0">
            <TD valign="top" colspan="4" height="58">
                  <IMG src="/design/DESIGN06_01.jpg" width="850" height="58" ></TD>
            <TD valign="top" rowspan="7" background="/design/leftsliver.gif" width="125">
                  <IMG src="/design/DESIGN06_02.jpg" width="155" height="511" >
            <TD valign="top" background="/design/middlesliver.gif" height="21" width="125">
                  <A href="/design/"      onMouseOver="window.status='home'; changeImages('home', 'nav_homeON.gif'); return true;" onMouseOut="window.status=''; changeImages('home', 'nav_home.gif'); return true;">
                  <IMG border="0" name="home" src="/design/nav_home.gif" width="125" height="21" ></A>
<TD valign="top" rowspan="7" background="/design/DESIGN06_04.gif">
<DIV class="pageheader">Welcome</DIV>
Whew! I've been pretty lately and didn't have time to update my site. Well, I finally took
some time to update it with a fresh new look! I hope you like it.
            <TD valign="top" rowspan="6" background="/design/rightsliver.gif" height="207" width="165">
            <IMG src="/design/DESIGN06_05.jpg" width="165" height="207" >
            <TD valign="top" background="/design/middlesliver.gif" height="26" width="125">
                  <A href="/design/about.php" onMouseOver="window.status='about'; changeImages('about', 'nav_aboutON.gif'); return true;" onMouseOut="window.status=''; changeImages('about', 'nav_about.gif'); return true;">
                  <IMG border=0 name="about" src="/design/nav_about.gif" width="125" height="26" ></A></TD>
            <TD valign="top" background="/design/middlesliver.gif" height="29" width="125">
                  <A href="/design/design.php" onMouseOver="window.status='design'; changeImages('design', 'nav_designON.gif'); return true;" onMouseOut="window.status=''; changeImages('design', 'nav_design.gif'); return true;">
                  <IMG border=0 name="design" src="/design/nav_design.gif" width="125" height="29" ></A></TD>
            <TD valign="top" background="/design/middlesliver.gif" height="21" width="125">
                  <A href="/design/resume.php" onMouseOver="window.status='resume'; changeImages('resume', 'nav_resumeON.gif'); return true;"      onMouseOut="window.status=''; changeImages('resume', 'nav_resume.gif'); return true;">
                  <IMG border=0 name="resume" src="/design/nav_resume.gif" width="125" height="21" ></A></TD>
            <TD valign="top" background="/design/middlesliver.gif" height="24" width="125">
                  <A href="/design/photos.php" onMouseOver="window.status='photos'; changeImages('photos', 'nav_photosON.gif'); return true;" onMouseOut="window.status=''; changeImages('photos', 'nav_photos.gif'); return true;">
                  <IMG border=0 name="photos" src="/design/nav_photos.gif" width="125" height="24" ></A>
            <TD valign="top" rowspan="2" background="/design/middlesliver.gif" height="390">
                  <IMG src="/design/DESIGN06_10.jpg" width="125" height="390" >
            <TD valign="top" background="/design/DESIGN06_11.gif" height="304" width="165">
            <DIV class="pageheader">Guest Book</DIV>
            Take a moment to sign my guest book!
            <TD valign="top" colspan="4" height="31" width="850">
                  <IMG src="/design/DESIGN06_12.gif" width="850" height="31" ></TD>
Question by:crimsondiva
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 30

Expert Comment

ID: 16866926
no wonder it gives you a headache...
html should be coded by hand with semantics in mind and separation between content and presentation.
the code generated by software is always ugly and impossible to maintain.

first, you should start by using a doctype:

use the HTML4.01 strict:

then use css-based layout (tables are for tabular data, not for layout).

and you should validate both your html and css:

good luck.

Author Comment

ID: 16872119

Generally, I hand code everything. This code is created from ImageReady/Photoshop CS. I read your comments. I'm new to doctypes, however. I've considered using CSS for layouts, but I'm not sure where to start. Can you recommend some sites and/or books for this?

LVL 30

Accepted Solution

GrandSchtroumpf earned 250 total points
ID: 16874779
I use the official w3c website (  That's the best source you can get...

> but I'm not sure where to start.
That's a common problem...
I suggest you start by reading the WAI section ( which explains all good practice rules in detail.
It will help you understand the basic principles of content/presentation separation.
I know it takes some time and the writing style is a little technical, but you get used to it, and it's definitely the best investment you can make if you want to build quality websites.

For real-life examples, a list apart ( is an excellent site.

Author Comment

ID: 16886647
Thanks for all of your help. I will have to take the time to do this!
LVL 30

Expert Comment

ID: 16887841
Yes, it takes some time to learn, but at least when you do things properly there are less chances you'll need to redcode the whole site.
IE6 is a major problem for all web developers, even when using proper code, so, be ready to have to learn a few little tricks to force IE behave a little better...

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Javascript 2 38
Google Tag Manager - Add Trigger Using Div class 22 62
Send email using HTML and PHP in separate file 5 41
need help with share buttons 11 72
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question