Blogger + Indentation?
February 25, 2009 9:15 AM Subscribe
How do I make Blogger work with indentation?
I'm trying to write some poetry in Blogger, and it has the habit of removing excess space (both at the beginning of words and in between words) that I don't want removed. Is there a way to make it not do that, without too much mucking about with HTML tags and that?
I'm trying to write some poetry in Blogger, and it has the habit of removing excess space (both at the beginning of words and in between words) that I don't want removed. Is there a way to make it not do that, without too much mucking about with HTML tags and that?
HTML condenses all multiple whitespace characters (spaces, tabs, returns) down to one space--that's not a Blogger issue, it's part of the HTML spec. If you want to insert multiple "hard" spaces, use the entity
If you want to do thing like paragraph indents or something like that, that'd be better handled through CSS. The proper CSS code will depend on exactly how your site is coded.
posted by adamrice at 10:01 AM on February 25, 2009
(non-breaking space).If you want to do thing like paragraph indents or something like that, that'd be better handled through CSS. The proper CSS code will depend on exactly how your site is coded.
posted by adamrice at 10:01 AM on February 25, 2009
Best answer: Unfortunately for all online poets, HTML treats any contiguous whitespace (spaces, tabs, newlines) as a single space -- it collapses whitespace. The easy but inelegant way to get around this to use a sequence of characters called the non-breaking space entity, which is an ampersand followed by the letters 'nbsp' followed by a semicolon -- the web browser won't collapse a series of these codes.
You could probably also use the HTML pre tag; this tells the web browser to treat all text within it as preformatted text which is to be formatted as-is.
posted by cobra libre at 10:06 AM on February 25, 2009
You could probably also use the HTML pre tag; this tells the web browser to treat all text within it as preformatted text which is to be formatted as-is.
posted by cobra libre at 10:06 AM on February 25, 2009
An example. The following text is enclosed by pre tags:
posted by cobra libre at 10:12 AM on February 25, 2009
Le Paradis n'est pas artificiel but is jagged For a flash, for an hour. Then agaony, then an hour, then agony,
posted by cobra libre at 10:12 AM on February 25, 2009
Pardon the typo.
posted by cobra libre at 10:13 AM on February 25, 2009
posted by cobra libre at 10:13 AM on February 25, 2009
Something else occurred to me, which gives you more flexibility than the PRE tag and doesn't force you to use monospaced text. Check out the whitespace section of the CSS 2.1 spec.
If you style a paragraph as, say <p style="white-space: pre-wrap;"> then spaces will be respected, manually inserted linebreaks will be respected, and lines will also wrap to fit as needed.
posted by adamrice at 12:29 PM on February 25, 2009
If you style a paragraph as, say <p style="white-space: pre-wrap;"> then spaces will be respected, manually inserted linebreaks will be respected, and lines will also wrap to fit as needed.
posted by adamrice at 12:29 PM on February 25, 2009
« Older Why/how do people cultivate mystique through... | Help me to mix up some shochu/oolong cocktails Newer »
This thread is closed to new comments.
posted by te1contar at 9:51 AM on February 25, 2009