4 comments | posted Apr 20
Add the following code for the comment-boxes in your HTML-Code in the Advanced-Customize-Area, which you find in your Profile-Backend:
.comment_box p.comment_post,
.comment_box_alt p.comment_post {
white-space: pre-wrap; /* Opera 7-9 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -moz-pre-wrap; /* Mozilla */
}
The only problem: It doesn't work in the InternetExplorer. But let us try to be honest, who really give a thing on that.
// Edit: Big thanks to Ken, who gave me the greate information how to work this trick also in other browsers.
Greetz,
Lemmi
Ken says:
nice. I consider myself a very experienced CSS'er, and I hadn't read about this at all yet. Appreciate the heads up. I really need to start watching for those unsupported tags, its so the CSS Transcendence way (good book) to do things. Great heads up though.
Here's a breakdown I just found of the CSS properties for this and a big browser checklist. It was on Ian Hicks blog in his CSS, but was posted and talked about thoroughly here:
http://cheeaun.phoenity.com/weblog/2005/06/whitespace-and-generated-content.html
white-space: pre; /* CSS2 */
white-space: -moz-pre-wrap; /* Mozilla */
white-space: -hp-pre-wrap; /* HP printers */
white-space: -o-pre-wrap; /* Opera 7 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: pre-wrap; /* CSS 2.1 */
white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */
word-wrap: break-word; /* IE */
So those are the browser specific, proprietary extensions until css spec's are adopted fully by all user agents and allowed.
Anyways, the browsers will grab the latest, so when css3 or 2.1 specs will allow user agents the tag, the browsers will auto grab that last line of css there. The article goes on for quite a bit more on the whitespace though, but I'm just way too tired to read the rest.
Thanks so much for this though man, great content here. Keep it up bro!
posted Apr 23
Comment replies (3)
Lemmi says:
Oh, it is very nice that you found this. I will check it today and edit my blog post in case of positive results.
posted Apr 23
chrysb says:
We're going to be adding this to the default CSS for comments.
posted Apr 24
Lemmi says:
Oh great.
Maybe my next blog in a view days will interest you too. :wink
posted Apr 24