Sure, laugh at my table-based layouts.  Scoff at my lack of positioned div's and bloated code (which isn't an issue over broadband anyway).  But at least I know my tried and true classic HTML works and looks good in all browsers. 

I tried to upgrade to XHTML 1.1 with the latest DocType Definition (DTD), and my lovely fireworks-sliced image header became broke in Firefox 2.0.  Why?  I don't know.  It add spacing/padding to each image so the header was no longer seamless.

I needed XHTML in order to integrate the Google Maps API.  In their docs, Google says "We recommend that you use standards-compliant XHTML on pages that contain maps. When browsers see the XHTML DOCTYPE at the top of the page, they render the page in "standards compliance mode," which makes layout and behaviors much more predictable across browsers."

Oh yeah, much more predictable.  That's why it looks different in IE7 than in FF 2.0.  Don't bother flaming me with how Microsoft doesn't adhere to standards; the reality is that the majority of the world uses IE, so it needs to look good in IE.  The paying customers don't care about standards or jargon. 

Rest assured I spent what seemed like ages (ie a couple hours) trying to eliminate the extra spacing.  I tried border:0px,  margin:0px, padding:0px, line-height:0, vertical-align:-100%  (as recommend somewhere and apparently misused ).  I tried manipulating the TR, adding a TBODY and manipulating that, styles on the IMG tag, display:block for the IMG tag.  You name it, I tried it.

Yes, I did try removing all the tables and making a DIV based header. 

Finally, I found something that made both IE, Firefox and Googlemaps happy:  (happy enough for my needs anyway)

 

Behold, The XHTML Transitional DTD:

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

W3schools.com says: "Use this DTD when you need to use XHTML's presentational features because your readers don't have browsers that support Cascading Style Sheets (CSS):" 

 

So it works.  Yay.  But the whole thing is definitely a bit פֿאַרקאַקט

 

Kick Me  Digg it