Text-wrap bug in HTML/CSS regardless of browser type?

M

Mantic

Hello.

I am having some problems with something that seems quite trivial. On
my web page, I am dynamically pulling content from a database via PHP
and mySQL, generating html code from the php script. So far every
'news' item that I pull displays just fine, except for one entry. That
entry doesn't wrap its text to its parent's width as every other entry
does. It just goes off into nothingland (overriding its parents
boundries). There are no strange HTML tags that would be causing this
that I know of.

We've narrowed the problem down to a specific sentance that breaks how
the text wraps. The strange thing is that this sentance doesn't contain
ANY punctuation or html tags. By simply removing the sentance,
everything works as expected.

My first thoughts was that our code wasn't valid, but it checks out to
be valid with XHTML 1.0 Strict. Our css code is valid too. Next I
thought it was a bug with Firefox, but then it behaves the same way
with Opera 9.0. IE doesn't really display the page properly at all, but
it shows signs of behaving similar.

Here is the url:
http://cymantix.org

The news item labeled "What? Two meals in one week?" is the one at
fault.
If we remove the sentance: "Ed Take a look at the annual Obfuscated
Perl Contest especially the code of David Powell" everything works fine
(even if we replace it with text equal in length, but just of different
content).

Strange.

Now, I'm fairly new to HTML/CSS development, and am hoping that the
solution to this problem is simple. The webpage is freshly under
construction, and is quite bare in terms of functionality (so please,
be gentle).

Thank you in advance for helping,

Mike
 
B

Benjamin Niemann

Mantic said:
Hello.

I am having some problems with something that seems quite trivial. On
my web page, I am dynamically pulling content from a database via PHP
and mySQL, generating html code from the php script. So far every
'news' item that I pull displays just fine, except for one entry. That
entry doesn't wrap its text to its parent's width as every other entry
does. It just goes off into nothingland (overriding its parents
boundries). There are no strange HTML tags that would be causing this
that I know of.

We've narrowed the problem down to a specific sentance that breaks how
the text wraps. The strange thing is that this sentance doesn't contain
ANY punctuation or html tags. By simply removing the sentance,
everything works as expected.

My first thoughts was that our code wasn't valid, but it checks out to
be valid with XHTML 1.0 Strict. Our css code is valid too. Next I
thought it was a bug with Firefox, but then it behaves the same way
with Opera 9.0. IE doesn't really display the page properly at all, but
it shows signs of behaving similar.

Here is the url:
http://cymantix.org

The news item labeled "What? Two meals in one week?" is the one at
fault.
If we remove the sentance: "Ed Take a look at the annual Obfuscated
Perl Contest especially the code of David Powell" everything works fine
(even if we replace it with text equal in length, but just of different
content).

The spaces in this sentence are 'non-breakable spaces' (codepoint 160,
a.k.a.  ), not ordinary spaces (codepoint 32) - and these are not just
in this sentence. Some editors fail to give some visual clue about their
presence. Simply removing and reinserting these spaces will probably help.

Here is what 'less' prints, which incorrectly (but enlightening in this
case) parses the file as iso-8859-1:

<p>
I'm thinking about a way to turn namespace and class definitions in C++
code, pulled from .h files, into a
n <strong>XML code graph</strong> that can be used for <strong>automatic
documentation</strong> and <stron
g>interactive online code-browsing with integrated live
documentation</strong>.
</p>
<p>
<a href="http://news.cymantix.org/mantic">Mantic</a> should be able to write
the C++ to XML converter in abo
ut half a line of Perl code.
</p>
<p>
Ed
Take a look at the annual Obfuscated Perl Contest especially the code of David
Powell
</p>
<p>
Has anyone made a <strong>Flash-based code browser</strong> before?  Especially one targeted
towa
rd open-api or open-source projects?
</p>

Look for the 'Â ' sequences.
 
M

Mantic

Ahh!

I will rip those out as soon as I can. What do you think spawned those?
The text was entered using WordPress --I'm thinking it was their "rich
editor" or something.

Thanks for the prompt reply, I appreciate it!

MIke
 
B

Benjamin Niemann

Mantic said:
I will rip those out as soon as I can. What do you think spawned those?
The text was entered using WordPress --I'm thinking it was their "rich
editor" or something.

Dunno... In OpenOffice you can enter these with ctrl-space. Other editors
may use different means. Perhaps there is some switch which you triggered
unconsciously that converts spaces into nbsp.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top