HTML Quick Tips
Part 1: Cross-Browser Compatibility
Part 2: Development
Part 3: Debugging
Part 4: References
Flash
Secure login with Flash

HTML
HTML quick tips

Photoshop
Converting Images to Black & White

Part 3: Debugging

Trying to debug your web pages is always a challenge Here are a few tricks that I advise to help with this, as well as some typical problems you will find.

Use Table Borders
When debugging table issues, set the border attribute to 1 on the relevant tables. This will allow you to see how the browser is actually laying out the table.

Take Advantage of Your Spacers
When you use transparent spacers in your layout, you can replace the spacer image file with a 1x1 coloured image instead of a transparent image. This will allow you to see in the browser how the spacers are actually affecting the layout.

Look For Extra White Space
A frequent offender is having white space between <td>...</td> tags and their contents. For example:

<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>
      <img src="images/something.gif" width="20" height="20" />
    </td>
  </tr>
</table>

may place extra white space around the image, while this:

<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><img src="images/something.gif" width="20" height="20" /></td>
  </tr>
</table>

will not.

Look For Mismatched Tags
A significant problem that can easily come up is a mismatching of tags, particularly in tables. The best way to combat this in the first place is by keeping your tables as simple as possible. Using a development environment such as Dreamweaver that hilights such issues in the code helps significantly with this.

< Previous: Development Quick Tips Start Next: References >    
 © Copyright 2004 Nathan Derksen