Quick CSS tip for those who tend to write their longer perlmonks posts in a text editor rather than in a textarea field.
Add the following to the top of your HTML while editing:
<style type="text/css"> code { display: block; white-space: pre; color: red; } p > code { display: inline; } </style>
In a vaguely CSS compliant browser it will cause code blocks to be displayed as pre-formatted blocks, unless they're inside a paragraph tag, where they're displayed inline. I also colour them red, but that's just for taste.
This allows me to happily sit in my editor and see a better approximation of what will appear online in the preview window.
(and don't forget to remove the style tags before you post online)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: CSS tip for offline perlmonks writing
by EdwardG (Vicar) on Nov 18, 2003 at 07:38 UTC | |
Re: CSS tip for offline perlmonks writing
by Anonymous Monk on Nov 18, 2003 at 05:23 UTC | |
by davido (Cardinal) on Nov 18, 2003 at 06:28 UTC | |
by Anonymous Monk on Nov 18, 2003 at 07:04 UTC | |
by jonadab (Parson) on Nov 18, 2003 at 15:10 UTC | |
by theorbtwo (Prior) on Nov 18, 2003 at 13:41 UTC |
Back to
Perl Monks Discussion