New here? Start with the essentials and go from there.

Friday, May 23, 2008

IE Fun Fact: cssFloat vs. styleFloat

I’m a bit embarrassed that I didn’t already know this cold, but I found out today that not only is the “float” style attribute called “cssFloat” in JavaScript, it’s called “styleFloat” in Internet Explorer.

From JavaScript tutorial - DOM CSS:
The only odd style is float, which is a reserved word in many languages, including JavaScript. As a result, the float style must be set using cssFloat in standards compliant browsers, and styleFloat in Internet Explorer (some standards compliant browsers also provide this as well). Simply set both of them. It will not cause any problems, and will work in all possible browsers.
In other words:
var floatValue = el.style['cssFloat'] || el.style['styleFloat'];
el.style['cssFloat'] = 'right';
el.stlye['styleFloat'] = 'right';

Monday, May 19, 2008

How To Attack An Internet Explorer Display Bug

I just mentioned this in today’s fun fact about zoom: 1, but it’s good enough that it deserves its own post: How To Attack An Internet Explorer Display Bug.

Read the whole thing, as they say. (Executive summary: use position: relative and, if that doesn’t work, move on to forcing hasLayout.)

Fun Fact: zoom: 1 Gives “hasLayout” in IE

I only just a few days ago discovered zoom: 1, the fun fun CSS attribute hack to force an element to hasLayout in Internet Explorer. (Alternative methods are floating or using height: 1%.)

For whatever reason, my IE hammer toolbox up to this point had been limited to position: relative, and I hadn’t delved into hasLayout as a solution at all. With zoom: 1 I (and you, I suppose) now have a second “well, let’s see if this works” option for getting a hidden or mis-aligned element to appear correctly in IE.

For a good summary of hasLayout and it what it’s good for, read “On having layout.” There’s also the very good “How To Attack An Internet Explorer Display Bug” article, which is quite thorough.

Webmonkey’s Back!

Webmonkey is back as part of Wired! The monkey appears now to be jazzed up with hipster glasses, indicating that this is truly Web 2.0.

Like Google’s Doctype, Webmonkey is now fully publicly-editable. I’ll be interested if this sort of thing ends up being an overall benefit, or if the sites won’t attract the dedicated admins that will keep them from being overrun.

I remember Webmonkey from the golden years. I believe I got significant instruction on server-side includes from them, as well as the details on the proper use of document.layers.

Friday, May 16, 2008

Google Doctype

I’m very excited to start using Google Doctype as a bit of a one-stop reference for HTML, CSS, etc. One curiosity I’ve found on the web is that a good JavaScript reference is very hard to find (which is why I recommend the Rhino book on JavaScript), and I hope that this will fill that void.

For fun bonus, take a look in the SVN tree for an open source version of (some of) Google’s common JavaScript library.

Firefox 3 RC1 release

From the Firefox 3 RC1 wiki page, the FTP directory of the RC1 builds.

In my 10-20 second evaluation of it so far, it feels a bit peppier than b5 (especially the location field) and hopefully won’t be so crashy with the latest Firebug 1.2a release.

Update: Mozilla has an official announcement of RC1.
Blog Widget by LinkWithin