Clear Helper plugin

Plugin details

A Rails plugin to simplify generation of "clear" divs.

Websitehttp://github.com/phallstrom/clear_helper Repositorygit://github.com/phallstrom/clear_helper.git Author Philip Hallstrom Tags div, clear LicenseMIT

Documentation

Install the plugin:
ruby 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>

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | (0 older versions) | Last edited by: hardway, about 1 month ago