[thelist] Whitespace, mysql, php, IE<7.0

Jon Molesa rjmolesa at consoltec.net
Fri Jan 19 07:03:45 CST 2007

right-on Hansen!  It took quite a bit of fudging, and it all seemed to hinge
around 'white-space: pre' for IE.

The text is displayed using a simple query and then just sticking it
into the body of html.  It's been a bit since I've looked over this
code, I had assumed the issue was resolved(i know) due to the fact that
I heard no complaints.  However, it still exists.  I'll look it over
again and get together a more detailed issue.  But you've struck the
nail on the head.  But it would go something like:

> How exactly are you displaying the output? I assume some kind of
> pre-formatted text, since you expect to see tabs rendered.

$html = $row['textinput'];

<div class="someclass">
Some standard text, now lets render our dynamic content <?php echo
$html; ?>

The 'white-space: pre' took care of wrapping, but it doesn't preserve
other formatting characters.

I'll get something more "scientific" together including some screen
shots, and a mirror of the site sometime this weekend.

PS - Here's a quick copy and paste of the CSS.  Certain settings that
corrected the text's appearance in IE broke it in FF.  So ultimately
this is what I wound up with.  I'm no CSS expert but the order of these
attributes did seem to matter

	text-align: left;
	white-space: pre;
	white-space: -moz-pre-wrap;
	white-space: pre-wrap;
	white-space: -pre-wrap;
	white-space: break-word;
	white-space: pre-line;

Thanks you evolters.  This community rocks!

Seems pretty straight forward as many, many online apps gather and
display content.  Which leads me to believe it's a php/mysql thing.  But
the fact that CSS does seem to affect it and that FF has no issue would
suggest a browser/IE thing.  Maybe I'm just a total tard.

Jon Molesa 

More information about the thelist mailing list