September 7th, 2011

  • JavaScript

jQuery Animation and Overflows

Thought I would share a little tip about animating with jQuery that I wasted a good hour on.  If you're animating the height of an object, jQuery will automatically set the item's overflow property to hidden.  Of course if you have items hanging of the edges like navigation buttons or anything with negative margins this is an undesirable effect.  That is unless you add overflow: visible !important to your stylesheet.  Problem solved, go back to your lives citizens.

July 7th, 2010

  • JavaScript

HTML5, CSS, and IE6

The other day I created a HTML5 webpage with a flash fallback for IE users.  Everything worked fine except IE 6 wasn't rendering styles associated to the new HTML 5 tags.  After digging around for a while I discovered that IE 6 won't render styles associated with HTML tags it doesn't know, unless you do a little bit of JavaScript trickry. For each unknown tag type you have to create it once in JavaScript like so:

document.createElement('video');

After that the styles should render correctly.

January 26th, 2006

  • JavaScript

Image Scaling with JavaScript

I recently implemented an image scaling feature for an image archive I wrote at work. Normally, I wouldn't scale an image down in a webpage, but I wanted the user to be able to download the full size image by right-clicking. And since these images are used for graphic design, it doesn't make sense to scale them before they're placed in the archive.

Archive of Previous Entries