File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

Word wrapping problem in xhtml.

Eivind Rasmussen
Greenhorn

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" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html>
<head>
<title>my page</title>
<link href="xhtml_css.css" rel="stylesheet" type="text/css" />
</head>
<body>
<p>
This is the text where some words get wrapped on some handsets.
<br/>
<a href=�a link">ok</a>
</p>
</body>
</html>

Values in the stylesheet which may be relevant:
p{
white-space: normal;
color: #666666;
}
body{
margin:0px;
padding:0px;
background:#FFFFFF;
}


Best regards,
Eivind
Eric Pascarello
author
Rancher

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

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

Eric
Eivind Rasmussen
Greenhorn

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: http://aspose.com/file-tools
 
subject: Word wrapping problem in xhtml.