phallstrom / clear_helper
- Source
- Commits
- Network (0)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Tree:
3089431
clear_helper / README
| 973337a0 » | phallstrom | 2008-09-29 | 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 | 9 | Installation | |
| 10 | ============ | ||||
| 11 | |||||
| 12 | ./script/plugin install git://github.com/phallstrom/clear_helper.git | ||||
| 13 | |||||
| 973337a0 » | phallstrom | 2008-09-29 | 14 | ||
| 15 | Example | ||||
| 16 | ======= | ||||
| 17 | |||||
| 18 | <%= clear %> | ||||
| 19 | <div style="clear:both; height: 0; max-height: 0; line-height: 0;"> </div> | ||||
| 20 | |||||
| 21 | <%= clear(:left) %> | ||||
| 22 | <div style="clear:left; height: 0px; max-height: 0px; line-height: 0px;"> </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;"> </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;"> </div> | ||||
| 34 | |||||
| 35 | |||||
| 36 | |||||
| 37 | Copyright (c) 2008 [Philip Hallstrom], released under the MIT license | ||||
