Improve Site Performance Increase Site Traffic Monitor Site Uptime Webmaster Resources NetMechanic Home Looking For Help? Partner Programs Privacy Policy Contact Us Press Room
NetMechanic Home LOGIN | HELP | ABOUT US | PRODUCTS | SITE MAP
NetMechanic Menu
Over 52 Million Web Pages Tested!     
 

Search for:


Your Email:

I would like to receive my newsletter in:
HTML format
Text format



Volume 8 (2005)
   September
   June
   April
   March
   January

Volume 7 (2004)
   November
   September
   July
   June
   May
   April
   March
   February (Part 2)
   February
   January (Part 2)
   January

Volume 6 (2003)
   December
   November (Part 2)
   November
   September
   August (Part 2)
   August
   July (Part 2)
   July
   June (Part 2)
   June
   May (Part 2)
   May
   April (Part 2)
   April
   March (Part 2)
   March
   February (Part 2)
   February
   January (Part 2)
   January

Volume 5 (2002)
   December (Part 2)
   December
   November (Part 2)
   November
   October (Part 2)
   October
   September (Part 2)
   September
   August (Part 2)
   August
   July (Part 2)
   July
   June (Part2)
   June
   May (Part 2)
   May
   April (Part 2)
   April
   March (Part 2)
   March
   February (Part 2)
   February
   January (Part 2)
   January

Volume 4 (2001)
   December (Part 2)
   December
   November (Part 2)
   November
   October (Part 2)
   October
   September (Part 2)
   September
   August (Part 2)
   August
   July (Part 2)
   July
   June (Part 2)
   June
   May (Part 2)
   May
   April (Part 2)
   April
   March (Part 2)
   March
   February (Part 2)
   February
   January (Part 2)
   January

Volume 3 (2000)
   December (Part 2)
   December
   November (Part 2)
   November
   October (Part 2)
   October
   September (Part 2)
   September
   August (Part 2)
   August
   July (Part 2)
   July
   June
   May
   April
   March
   February
   January

Volume 2 (1999)
   December
   November
   October
   September
   July
   June
   May
   April
   March
   February
   January

Volume 1 (1998)
   December
   November
   October
   September

 

HTML Tip:
Cross-Browser Tables

by Tom Dahm,
Chief Operations Officer,
NetMechanic, Inc.

  
September 1998
Vol. 1, No. 1
 • HTML Tip
 • Design Tip
 • Resource
  

If you use HTML tables to control the layout of your Web pages, here's one of our best browser compatibility tips: always include the attribute BORDER="0". Do this even though the default for the BORDER attribute is zero.

The reason for this is that Netscape Navigator puts additional white space around each table cell unless you explicitly set BORDER="0". If you're using your TABLE to control the positioning of other elements within the page, this little bit of extra space can affect alignment.

For an example, look at the images below. They show a table containing four black squares. We want this table to look identical under both Netscape and Microsoft browsers. However, the table is rendered differently, with Netscape Navigator showing more space between the squares.

Netscape TABLE with default BORDER attribute Microsoft TABLE with default BORDER attribute

In this example, the TABLE tag is defined as follows:

<TABLE CELLSPACING="2" CELLPADDING="2">

Now look at these same tables again, this time with BORDER explicitly set to zero. The separation between the squares is now the same.

Netscape TABLE with BORDER="0" Microsoft TABLE with BORDER="0"

Much better. In this second example, the TABLE tag is defined as follows:

<TABLE BORDER="0" CELLSPACING="2 CELLPADDING="2">

While you're at it, it's also a good idea to set CELLSPACING and CELLPADDING to specific values. Do this for the same reason: so they will have the same values under different browsers. In short, never trust the browser default values for TABLE tag attributes.

NetMechanic's HTML Toolbox will alert you to other browser incompatibility issues on your Web pages. Use it to look for HTML code errors, check for broken links, and identify HTML code that may not display correctly across browsers.



Rate This Tip:
Not Useful Useful Very Useful   
 
NetMechanic Tools
HTML Toolbox
Browser Photo
Server Check
Search Engine Starter
Search Engine Tools
GIFBot
Newsletter
HTML Tutorial and Tips
Search Engine Tutorial
Accessibility Information
Browser Problem Tutorial

Company Info
Products
About Us
Contact
Advertise
Link To Us
Jobs
Privacy Policy
Partner Programs
Press Room
RSS Feed
Support
 



Powered by Overture!

 
     
 
   
 
     


Keynote Home
Copyright © 1996-2007,
Keynote NetMechanic
All rights reserved.