
In designing my new site, I quickly became aware of something missing from the vast arsenal of CSS and Javascript widgets out there for general consumption; at least as far as I could tell—I needed something that would give me the ability to place variable-length text on top of a background image, as seen in the twitter feed above, and the title of this blog post (provided you're reading this on my site, and not the blog).
So, I put together VerticalFillJs the other day, a more refined version of what I'm running on this page. It's real easy to implement, just include the script in the head of your document, and assign the trigger class (default: verticalFill) to any (block) element that should be resized to fill its container, and your CSS does the rest. Works with padding and margins on both affected and parent element, and tested in IE, Mozilla, WebKit and Opera—see the demo for more info.
0 comments:
Post a Comment