Re: [css-d] Pre-wrap and hanging indent?
Rodent of Unusual Size wrote: I want to display an IRC conversation log fragment in an HTML pre element. I want the effect of white-space: pre-wrap, so that text on each line that's too wide will wrap. However, when that happens I want the wrapped text to be indented, so that it'll be clear that it's a continuation. I could probably get the effect I want by putting each line into an appropriately-styled p element or the like, but that's awkward. Is there any way to set a hanging indent on 'pre-wrap' text like this? Sort of treating each line from start to hard newline as an implicit block element? ROUS, You can create a hanging indent effect by using a negative text-indent value. That pulls the first line off to the left, creating the appearance that all subsequent lines are indented. However, this is dependent on each piece of text to be wrapped in some sort of container that you apply the text-indent to -- there's no such thing as an implicit block element as you mention. Either you've told the browser how to group the content, or you haven't. If you just have all the pieces of text plopped in a pre element, you wouldn't have anything to apply the text-indent property to. I suppose you could wrap each piece of text in its own pre element, rather than just have one pre element for the entire conversation? Zoe -- Zoe M. Gillenwater Design Services Manager UNC Highway Safety Research Center http://www.hsrc.unc.edu __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
[css-d] Pre-wrap and hanging indent?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'm not sure how to phrase what I want, so I'll just describe the effect I'm after. I want to display an IRC conversation log fragment in an HTML pre element. I want the effect of white-space: pre-wrap, so that text on each line that's too wide will wrap. However, when that happens I want the wrapped text to be indented, so that it'll be clear that it's a continuation. I could probably get the effect I want by putting each line into an appropriately-styled p element or the like, but that's awkward. Is there any way to set a hanging indent on 'pre-wrap' text like this? Sort of treating each line from start to hard newline as an implicit block element? I doubt it, but ya never know.. As an example, I'd like to have pre speaker1 normal length line speaker2 some really horribly hellaciously long line of text speaker1 oh yeah /pre be rendered something like this: speaker1 normal length line speaker2 some really horribly hellaciously long line of text speaker1 oh yeah Thanks for any help or pointers.. - -- #kenP-)} Ken Coar, Sanagendamgagwedweinini http://Ken.Coar.Org/ Author, developer, opinionist http://Apache-Server.Com/ Millennium hand and shrimp! -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iQCVAwUBQ1TYU5rNPMCpn3XdAQKKzwQApFpxNcqptw4EiXBPBscw4a8jwuttyEfe 7bFwLwUz6b/SahFygYGT+++srqKD9A6RNAH81HbnWHeJ5HkH7vqQHYpJddVYyC4A aOYPsHolac1h8mGF4FS6Ns89GxY+t0zf8ZDZTqR73j3feyKgcDNkTK3c4O1HPZBg YuE/TkBjLog= =89Oo -END PGP SIGNATURE- __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/