Web development
Use negative margins and light weight semantic markup to display a form with the labels on one side and form elements on the other. No tables or divs needed at all. Works in all browsers. Noone who wasn’t a web developer would believe what a pain it is finding a good solution to this little problem.
Media queries are extra params for the CSS @media types that you can use to target styles for different devices based the device’s capabilities like dimensions and colour depth. They are part of the W3C CSS3 standard and are supported in the latest vesion of Opera (desktop and mini versions), Firefox and Safari. Media queries [...]
One thing coming up in the W3C selectors api spec are a couple of new methods for retrieving DOM elements called querySelector() and querySelectorAll() that take a css selector and return a node or list of nodes that match. They basically do the same thing as the css query features of JQuery or Dean Edward’s [...]
The FAQ on del.icio.us made me laugh: (I wonder if they could do something about the new X-Files movie next…?)
I’m getting quite interested in Safari because it seems to be where a lot of the early implementations of interesting new standards is happening. It makes me happy to get a little glimpse at what the future of web development might look like. :) The problem is Firefox has really spoilt me with all it’s [...]
Neat little tip I found (in my old, old blog archives) is that you can switch Opera into hand held emulation mode by hitting Shift+F11. It’ll take your site and serialize the design to fit on a small screen like on your phone: It also will honour the @media handheld stylesheet so it’s a convenient [...]
One of the guys at work inspired me to try a mouse gestures plugins for Firefox today. For the uninitiated, mouse gestures are like keyboard shortcuts for the mouse. Instead of holding ctrl+c, you do a little drawing on the screen while holding down the right mouse button to make something happen. For example when [...]
Learnt something new today! There’s a repository of open source javascript code called JSAN modelled on the perl version. There’s a whole lot of interesting stuff on there like UI widgets, animations and AJAX. I haven’t tried any but it’s nice to know there’s somewhere you can see what other people are doing.
One recurring problem I’ve had when using a function from a custom javascript object as an event handler is that when the event handler is called the “this” property of the function no longer references the object it originally belonged to. To show you what I mean, take a look at this simple javascript object. [...]
Today I found out that gmail supports checking and storing POP3 mail and it made me wonder if I even need a desktop email client any more. It has everything I use in Thunderbird (sorting, filtering, searching, address book) with the big advantage of being on the network and therefore accessible from any computer. So [...]
I wanted to document a bit of an edge case browser incompatibility that I found: that event handlers aren’t always run in the same order in IE as they do in other browsers. It’s a bit of a strange case where we were doing something not entirely sensible. :) There was an input box which [...]
Ok, I’m now officially in love with Firefox. My Vista install has mysteriously become flaky recently and is randomly taking down programs. When Firefox crashed, not only did it remember which tabs I had open, it also remembered the contents of what was in the form that I was filling in at the time of [...]
On the ever interesting topic of curiosity over good sense, I had an interesting discussion about how far you can nest HTML tables in different browsers. The person I was talking to had noticed that at a certain point the tables just stopped displaying when they tried to take their web rendering to an extreme [...]
Microsoft is amazing. WPF/E has been around for ages. They give it a fancy name and run a keynote about it at MIX and suddenly it’s the biggest thing to hit (Microsoft) web development since someone came up with a catchy name for ajax. This week it seems like its the only thing that anyone [...]
I was a bit disappointed when I read that public IE bug database isn’t being reopened. The reason given was that the volume of unusable bug reports submitted far outweighed the useful stuff. Apparently some people used it to tell the team how much they hate IE. :) I can understand that being a problem [...]
I came across a weird feature of javascript last week, a way of spanning javascript strings over multiple lines. To do it you put a ‘\’ character just before the line break and javascript knows it should keep going on the next line: var mystring = "hello \ [...]
DIY javascript stack trace
on 12 May 07
(12 comments)
How to use arguments.callee to walk up the javascript call stack when you’re doing something that a debugger can’t help you with.
It’s ER night again tonight so I’m going to update with a totally dorky technical web thing I did today that I thought was interesting. :) I found a strange IE behaviour today in a sample I was looking at. The problem was with a javascript object that had a reference to a DOM object. [...]
I’m doing a lot of work with javascript that modifies the DOM so I really like tools like the Firefox rendered source chart plugin so I can see what’s actually going on in my page. Rendered source chart in particular is a very slick plugin. It not only takes everything in the DOM and shows [...]
Something I really, really love at the moment is a little application called javascript lint. It’s a javascript syntax checker that’s built on top of the Mozilla javascript engine. You can run it over a javascript include file (I don’t know if it’ll work on inline javascript) and it’ll syntax check it for you without [...]
I was trying to style a bit of html without having to add a new class into the markup and came across two types of CSS selectors that I haven’t used before called child and sibling selectors. You can use child selectors to target the direct children of an element. The syntax is parent > [...]
I’ve been playing around with CSS support in IE7 all day and I’m so happy to see some of the really, really long standing things that have been finally fixed! The thing that makes me happiest is that you can finally do real work with absolute positioning because it finally supports the bottom and right [...]
Yay! Finally I’ve finished all the basic functionality for my new blog scripts after months trying to find development time between visiting Australia, moving house, building Ikea furniture and showing my parents around London. Hopefully I’ll get it live sometime between now and the end of the month. The best part for me is that [...]
Last time I wanted to update my McAfee virus subscription they told me that I couldn’t download the latest version of the software using Firefox. The only option I had to download the software was to use IE. I couldn’t find another way to download the product. So say we take a fairly conservative view [...]
This has to be the most novel use of Google maps ever :D





