my dog learned polymorphism
The moose likes HTML, CSS and JavaScript and the fly likes Word wrapping problem in xhtml. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Word wrapping problem in xhtml." Watch "Word wrapping problem in xhtml." New topic

Word wrapping problem in xhtml.

Eivind Rasmussen

Joined: Dec 05, 2003
Posts: 8
(Hope its ok to post a xhtml question in the html section..)

I have written a xhtml page for mobile phones, and I�m experiencing a word-wrapping problem on some phones. Some mobile phones choose to split up words at the end of a line. E.G. If the word �text� is at the end of a line and the word won�t fit on the line (only 3 chars left to use on that line), the phone writes �tex� on this line, and �t� at the start of the next line. So far I have found that this issue occurs on these handsets: Samsung A680, LG 325 and Nokia 6225. Below is the code I use when I experience this problem. Anybody who can help? Any feedback is deeply appreciated.

The code I use:
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "">
<title>my page</title>
<link href="xhtml_css.css" rel="stylesheet" type="text/css" />
This is the text where some words get wrapped on some handsets.
<a href=�a link">ok</a>

Values in the stylesheet which may be relevant:
white-space: normal;
color: #666666;

Best regards,
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
never coded for a phone before.

not sure it supports this property like IE does:
word-wrap: break-word;
word-wrap: keep-all;

Eivind Rasmussen

Joined: Dec 05, 2003
Posts: 8
Hi, thanks for the answer. Unfortunatly it didn't have any effect on the phones I tested with.
Any other ideas anyone?
I agree. Here's the link:
subject: Word wrapping problem in xhtml.
It's not a secret anymore!