Need a lil help on html.

Status
Not open for further replies.
K

Kalyan

Guest
Hi there..

I gotta write jsp coding where in I use html for the frontend. When I retrieve data and display it in a html table, in the <td></td>, if the data contains spaces, it is breaking up to be shown in rows.

Eg:

<td>Microsoft Windows XP Proffessional</td>

would show up as

Microsoft
Windows
XP
Proffessional

I know that inserting an &nbsp; would solve my issue but the data would be coming dynamically from the database and I cant insert the &nbsp; for the spaces. Is there any way to change the property of <td> to display a group of words with spaces in a single row and expand the width accordingly? any trick like using <label>, <div>, some <input> with transparent boundaries.. etc are also welcome.. Please solve this for me.
 

QwertyManiac

Commander in Chief
But checking that example of yours shows the entire thing in one line itself :?

Like here:

*img209.imageshack.us/img209/3365/lolij5.th.gif

But anyway, would wrapping the text in <p> help?
 
OP
K

Kalyan

Guest
Ya.. I just showed it for an example. if the table had more rows and columns, then it would show it in mutiple lines due to automatic word wrapping. Anyway, I figured it...

<td nowrap="nowrap">Microsoft Windows XP Proffessional<td>

would solve it..

Thanks for trying..
 
Status
Not open for further replies.
Top Bottom