January 22nd, 2008 by Leons Petrazickis
After an internal build of Internet Explorer 8 passed the Acid2 test, they’ve announced that the new engine will only be used for sites with a special, opt-in meta tag:
<!– IE8 engine –>
<meta http-equiv="X-UA-Compatible" content="IE=8">
<!– latest engine –>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
It can also be triggered from the server via an HTTP header:
X-UA-Compatible: IE=8;
Firefox is unlikely to follow suit.
In other news, John Resig has done some testing on sub-pixel rounding across browsers.
Posted in javascript, css, html | No Comments »
June 21st, 2007 by Leons Petrazickis
The latest nightlies of Webkit (development branch of Apple Safari) now have the web inspector in them. It doesn’t replace the tools in the other browsers, but it does have one very effective piece of unique functionality — a page load graph that gives an exact breakdown of order-of-loading and time-to-load of each script, stylesheet, and image.
First of all, enable the debug menu. It gives you access to the Javascript console and such things.
- Open C:\Documents and Settings\chng1me.T40-92U-V46\Application Data\Apple Computer\Safari
- Open Preferences.plist
- Insert the lines below mid-file:
<key>IncludeDebugMenu</key>
<true/>

Open Safari by executing run-nightly-webkit.cmd in your Webkit install. Right-click and the inspect an element from the context menu.

Now, click on the icon in the bottom left-hand corner and choose Network.

Voila!
Posted in javascript, css | 2 Comments »
March 28th, 2007 by Leons Petrazickis
Firefox has the Web Developer Toolbar, Opera has the “Debug with Outline” user mode and developer tools, but the browser that needs block outlining the most has long been limited to obscure bookmarklets.
A more robust tool is the Internet Explorer Developer Toolbar. Outlining elements is one of its useful features.
To fix things in IE6 without breaking them in other browsers, replace any rule such as:
/* Works in good browsers */
#content {
width:500px;
}
with:
/* Works in good browsers */
#content {
width:500px;
}
/* IE6 fix */
* html #content {
width:502px;
}
This is valid CSS and, since IE6 is the only browser that thinks the html element has an ancestor, the second rule will only cascade down in IE6.
A different approach is endorsed by the IE team, but I find it less elegant.
Posted in css | No Comments »
March 5th, 2007 by Leons Petrazickis
One of the tricky things in web design is picking the right colours. They need to be easy to read, not grim, not flashy, yet somehow distinctive. Often, taking a stab in the dark and then tweaking a screenshot of the result for saturation, contrast, and the like can be very effective. At other times, you need a starting point.
These have all helped me:
Posted in css | No Comments »