phallstrom / clear_helper

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

This URL has Read+Write access

clear_helper / README
973337a0 » phallstrom 2008-09-29 first commit 1 ClearHelper
2 ===========
3
4 ClearHelper is a simple one method helper to make creating a "cleared" div
5 simple and consistent across platforms. You can specify whether you want to
6 clear 'both', 'left', or 'right' and set the height of the div in any unit you
7 want (defaults to pixels).
8
127fe227 » phallstrom 2008-09-29 update README to include in... 9 Installation
10 ============
11
12 ./script/plugin install git://github.com/phallstrom/clear_helper.git
13
973337a0 » phallstrom 2008-09-29 first commit 14
15 Example
16 =======
17
18 <%= clear %>
19 <div style="clear:both; height: 0; max-height: 0; line-height: 0;">&nbsp;</div>
20
21 <%= clear(:left) %>
22 <div style="clear:left; height: 0px; max-height: 0px; line-height: 0px;">&nbsp;</div>
23
24 Failure to specify the unit for the height will default to 'px'.
25
26 <%= clear(:right, 10) %>
27 <div style="clear:left; height: 10px; max-height: 10px; line-height: 10px;">&nbsp;</div>
28
29 If the first value is not one of 'both', 'left', or 'right' it will be assumed to be the height
30 and will default to 'both'.
31
32 <%= clear('2.5em') %>
33 <div style="clear:both; height: 2.5em; max-height: 2.5em; line-height: 2.5em;">&nbsp;</div>
34
35
36
37 Copyright (c) 2008 [Philip Hallstrom], released under the MIT license