tooki
asked on
HTML table syntax
I have created a table in HTML that has about 10 fields.
Some of the fields contain values that contain "spaces". When
the table is displayed on the browser, the contents of those
fields (that contain values with spaces) are often shown in
separate lines on the browser, as if the spaces
are newlines.
Is there any HTML table syntax that can help show the content
of a big field in a single line on the browser?
Example: One field content "This_is_the_first_line This_is_the_second_line"
I wish to show this on a single line on the HTML page.
Thanks,
tooki
Some of the fields contain values that contain "spaces". When
the table is displayed on the browser, the contents of those
fields (that contain values with spaces) are often shown in
separate lines on the browser, as if the spaces
are newlines.
Is there any HTML table syntax that can help show the content
of a big field in a single line on the browser?
Example: One field content "This_is_the_first_line This_is_the_second_line"
I wish to show this on a single line on the HTML page.
Thanks,
tooki
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Post your code. Bruno's answer might work, or it might not. Depends on everything else in the table.
<TD NOWRAP>
KISS -keep it small and simple ;-)
wboevink,
your solution is just an older version of what I posted...
your solution is just an older version of what I posted...
So it works in most (and older) browsers.
If you use nbsp, you don't even need to use the nowrap -- the browser won't break lines without spaces. That will work for EVERYTHING, but it's going to make your table be really huge and hard to read. You could also make all your text a graphic, which would look exactly how you want, but make it even HARDER to read. ;-)
How many rows does this have? If you have more columns than rows, you might want to pivot the table -- reverse how you have it.
How many rows does this have? If you have more columns than rows, you might want to pivot the table -- reverse how you have it.
<nobr>somereallylonglineof textthatis aproblem</ nobr>
this is not standard html but it works in IE and Netscrap
IF... you want it to break somewhere you can add a <wbr> tag where you want the break to occur...
<nobr>somereallylonglineof <wbr>textt hatisaprob lem</nobr>
so if there is room it will not wrap if there is not room it will wrap where you specify with the <wbr> tag...
JimS.
this is not standard html but it works in IE and Netscrap
IF... you want it to break somewhere you can add a <wbr> tag where you want the break to occur...
<nobr>somereallylonglineof
so if there is room it will not wrap if there is not room it will wrap where you specify with the <wbr> tag...
JimS.
ASKER
Thanks a lot!! It worked perfectly.
-tooki
-tooki
Glad I could help! Thanks for the A. :-)