Difference between revisions of "Template:PBR/doc"
m |
m (→Breaking Lines) |
||
Line 82: | Line 82: | ||
{{PBR}} | {{PBR}} | ||
test{{PBR}} | test{{PBR}} | ||
</div> | |||
<hr> | |||
| | |||
===Goal=== | |||
<div> | |||
test<br> | |||
test<br> | |||
test<br> | |||
test<br> | |||
test<br> | |||
test<br> | |||
test<br> | |||
test<br> | |||
test<br> | |||
</div> | </div> | ||
<hr> | <hr> |
Revision as of 20:51, 17 April 2009
WTF?
Template:PBR is intended to give the outward appearance and effect of the BR tag with the exception that multiple uses of it will not cause multiple lines of whitespace. You use it everywhere you want a linebreak but don't want to have extra whitespace associated with linebreaks piling up. Essentially PBR is a conditional BR, if a BR is needed it works as a BR, if it's not needed it has no effect. It's the bees knees.
How it works
The original version used an empty "div" tag but it had the side effect that you would have to fight the wiki engine to keep it from inserting "p" tags. The solution is to *not* fight the wiki engine and use a tag that it will let you include in "p" tags. The new version uses an empty "span" tag, which is "p" friendly but with inline style we convert the tag to "block" from "inline".
Breaking Lines
BR Tagtest |
DIV
test
test
test
test test testtest test test |
SPAN Blocktest
test
test |
BR Tag + Styletest |
PBR Templatetest
test
test |
Goaltest |