Saturday, May 2, 2009

Resize Your Images Automatically with Fluid Images

Ethan Marcotte has raised an issue about Fluid Grids, that working with non-fixed layouts can be more difficult once you introduce fixed-width elements into them. By default, an image element that’s sized at, say, 500px doesn’t exactly play nicely with an container that can be as large as 800px, but as small as 100px. What’s a designer to do?


He has wriiten a little script that makes Fluid Images. In short, it cycles through your document, swaps out the images for a transparent GIF, and applies the AlphaImageLoader property to each one. Then, whenever the window’s resized, the script automatically recalculates the proper, proportional height and width of the image, and resizes the spacer graphic accordingly. You can see it in action, and download the script.



Fluid Images



Requirements: -

Demo: http://unstoppablerobotninja.com/entry/fluid-images/

License: License Free





If you enjoyed this post, make sure you subscribe to my regular Email Updates!

0 comments:

Post a Comment

Followers

Action

Mesothelioma Cancer
ThemeFlash Msn bot last visit powered by MyPagerank.Net Creative Commons License
 

ThemeFlash : The Quality Web Resources. Copyright 2009-2010 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol