Solved

Internet Explorer table rendering - Browser Compatibility

Posted on 2006-06-08
5
394 Views
Last Modified: 2008-01-09
Hello,

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: www.crimsondiva.com/design/.

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">
      <TR>
            <TD valign="top" colspan="4" height="58">
                  <IMG src="/design/DESIGN06_01.jpg" width="850" height="58" ></TD>
      </TR>
      <TR>
            <TD valign="top" rowspan="7" background="/design/leftsliver.gif" width="125">
                  <IMG src="/design/DESIGN06_02.jpg" width="155" height="511" >
            </TD>
            <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>
<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>
            <TD valign="top" rowspan="6" background="/design/rightsliver.gif" height="207" width="165">
            <IMG src="/design/DESIGN06_05.jpg" width="165" height="207" >
            </TD>
      </TR>
      <TR>
            <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>
      </TR>
      <TR>
            <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>
      </TR>
      <TR>
            <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>
      </TR>
      <TR>
            <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>
       </TR>
      <TR>
            <TD valign="top" rowspan="2" background="/design/middlesliver.gif" height="390">
                  <IMG src="/design/DESIGN06_10.jpg" width="125" height="390" >
            </TD>
      </TR>
      
      <TR>
            <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>
      </TR>
      <TR>
            <TD valign="top" colspan="4" height="31" width="850">
                  <IMG src="/design/DESIGN06_12.gif" width="850" height="31" ></TD>
      </TR>
</table>
</BODY>
</HTML>
0
Comment
Question by:crimsondiva
[X]
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
5 Comments
 
LVL 30

Expert Comment

by:GrandSchtroumpf
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:
http://www.htmlhelp.com/tools/validator/doctype.html

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

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

and you should validate both your html and css:
http://validator.w3.org/
http://jigsaw.w3.org/css-validator/

good luck.
0
 

Author Comment

by:crimsondiva
ID: 16872119
GrandSchtroumpf,

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?

Diva
0
 
LVL 30

Accepted Solution

by:
GrandSchtroumpf earned 250 total points
ID: 16874779
I use the official w3c website (www.w3.org).  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 (www.w3.org/WAI/) 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 (www.alistapart.com) is an excellent site.
0
 

Author Comment

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

Expert Comment

by:GrandSchtroumpf
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...
0

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

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

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

691 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