public
Description: A Rails plugin to simplify generation of "clear" divs.
Homepage:
Clone URL: git://github.com/phallstrom/clear_helper.git
name age message
file MIT-LICENSE Mon Sep 29 20:22:41 -0700 2008 first commit [Philip Hallstrom]
file README Loading commit data...
file Rakefile
file init.rb
file install.rb
directory lib/ Wed Dec 24 13:46:46 -0800 2008 update clear helper to take an hash as an argum... [Philip Hallstrom]
directory tasks/ Mon Sep 29 20:22:41 -0700 2008 first commit [Philip Hallstrom]
directory test/
file uninstall.rb Mon Sep 29 20:22:41 -0700 2008 first commit [Philip Hallstrom]
ClearHelper
===========

ClearHelper is a simple one method helper to make creating a "cleared" div
simple and consistent across platforms.  You can specify whether you want to
clear 'both', 'left', or 'right' and set the height of the div in any unit you
want (defaults to pixels).

Installation
============

./script/plugin install git://github.com/phallstrom/clear_helper.git


Example
=======

<%= clear %>
<div style="clear:both; height: 0; max-height: 0; line-height: 0;">&nbsp;</div>

<%= clear(:left) %>
<div style="clear:left; height: 0px; max-height: 0px; line-height: 0px;">&nbsp;</div>

Failure to specify the unit for the height will default to 'px'.

<%= clear(:right, 10) %>
<div style="clear:left; height: 10px; max-height: 10px; line-height: 10px;">&nbsp;</div>

If the first value is not one of 'both', 'left', or 'right' it will be assumed to be the height
and will default to 'both'.

<%= clear('2.5em') %>
<div style="clear:both; height: 2.5em; max-height: 2.5em; line-height: 2.5em;">&nbsp;</div>



Copyright (c) 2008 [Philip Hallstrom], released under the MIT license