Safari Rendering Issues
I'll be honest, I know very little about the Mac OS and even less about it's
popular browser Safari. And, until recently, I had very little reason to
care. However, I happened across an issue (and possibly a bug) with the
rendering agent used by Safari. Safari like other OSX and a few linux apps uses
the open source WebKit (KHTML) framework for
its rendering.
Today I was asked to resolve some severe rendering issues with a family of websites owned by a client of the company I am interning for. Three of the five sites had Safari rendering issues. It just so happens those three sites were redesigned by an Indian firm and the other two by me. Anyways, they had an XHTML 1.0 Strict doctype but weren't anywhere near compliant. Each with 100+ errors. Don't be surprised... this is phpfox 1.2 I'm talking about.
One Style, Big Problem
I thought, hey, easy fix. Correct the XHTML compliancy and the rendering issues will go away. A few find and replaces later with some sexy regex's and I had the sites compliant. However, it didn't fix the problem despite W3C validator's clean bill of health.
After some more digging I discovered that the problem was with a table that had a height of 100%. It's parent container (another table cell) had a defined height of 127px. For one reason or another, this table was expanding outside of it's parent and overlapping underlying layers (or on some refreshes allowing layers to overlap it). It looked like float creep gone rampant. Most bizarre thing. I don't blame the Indian programmers, they couldn't have foreseen this. But once again it does make the overpriced American firm come out looking good.
The worst part was...
I didn't have a Mac so I needed a Safari alternative. I was able to find a browser called Swift which uses the webkit framework for rendering. It's a decent, compact browser with all the modern browser features including tabbed browsing. However it's still buggy; I managed to crash it thrice.
No wait, it gets better. We keep repos of the sites we work on, but since we aren't sharing a repo or dev site with the Indian firm I had to work directly on the live server. So I brought 3 sites to XHTML compliancy whose code is spread across about 20 templates each with nothing more than ssh and nano in under 2 hours.
Ok, now I care
Less than an hour after making this post I randomly discovered that Apple is releasing Safari 3 for Windows. Well damn, now I really have to care about my sites being Safari compliant. Perhaps the better coverage will also improve the Webkit rendering agent. Either way, IE7 and Firefox have some competition. I'll force myself to use it for a few days and keep an open mind. We'll see.

Firefox, IE7, and Safari on Windows Vista
Apple's Safari is the devil...... much, much more so than IE. Unfortunately for us, 90% of web design is working around all the various browser quirks, and safari just happens to be one of those important browsers.....
Here is a fun one: try having javascript bring you to a named anchor in safari.... it gives you the pinwheel of death in OSX.
<pre name="code" class="jscript">
<script language='JavaScript'><!--
window.location.href='#gohere';
//--></script>
Posted by Jason Johnson on June 15, 2007 at 09:09 AM CDT #
one thing to keep in mind when you are programming for safari 3 is that most mac users are using safari 2, and they render quite differently, especially in the case of styling forms. I had a situation recently where this vast difference cost me about 10 hours time in fixes......
Posted by Jason Johnson on July 31, 2007 at 01:07 PM CDT #
yeah, i'm having safari problems now. 3 seems to be yet another engine to take into account, grrrr.
Web-kit if the most standards compliant browser of the lot though I think, so it's the fact that we've been used to writing for sub-optimal rendering engines thats the real problem i think.
Posted by jeff on August 15, 2008 at 06:06 AM CDT #