Dynamic Image Borders

Posted in Development.

I had this great idea to make the process of creating custom image borders a little less painful. The beauty of this method is it uses the jQuery library, is called by using only one class in the img tag and the border doesn’t have to be built into each image. Another great benefit to this method is that it’s dynamic, so it doesn’t matter if your image is 5px wide and 400px tall or 600px wide and 40px tall or whatever…

I’ve tested it in Firefox 3 (Mac), Safari 3, and on Internet Explorer 7 and didn’t have any problems. If anyone comes across any bugs, Let me know and I’ll take a look at them.

I’m not sure if I’d call this a proof of concept because, well, let’s face it, the internet is a huge place and I can’t search every nook and cranny, but I did do a lot of searching and couldn’t find anything remotely like this. I present Dynamic Image Borders. You can also download the source from Github.