?
Solved

HTML table syntax

Posted on 2002-07-05
10
Medium Priority
?
185 Views
Last Modified: 2010-04-09
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
0
Comment
Question by:tooki
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +3
10 Comments
 
LVL 18

Accepted Solution

by:
bruno earned 200 total points
ID: 7132590
put this in the TD...


<td style="white-space: nowrap;">

and use this for your spaces..


&nbsp;

(stands for non breaking space)



BRUNO
0
 
LVL 19

Expert Comment

by:webwoman
ID: 7133281
Post your code. Bruno's answer might work, or it might not. Depends on everything else in the table.
0
 
LVL 12

Expert Comment

by:Wouter Boevink
ID: 7140096
<TD NOWRAP>
0
WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

 
LVL 51

Expert Comment

by:ahoffmann
ID: 7140152
KISS -keep it small and simple ;-)
0
 
LVL 18

Expert Comment

by:bruno
ID: 7140765
wboevink,

your solution is just an older version of what I posted...
0
 
LVL 12

Expert Comment

by:Wouter Boevink
ID: 7140955
So it works in most (and older) browsers.
0
 
LVL 19

Expert Comment

by:webwoman
ID: 7141302
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.
0
 
LVL 2

Expert Comment

by:TenTonJim
ID: 7141369
<nobr>somereallylonglineoftextthatisaproblem</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>textthatisaproblem</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.
0
 

Author Comment

by:tooki
ID: 7151633
Thanks a lot!! It worked perfectly.
-tooki
0
 
LVL 18

Expert Comment

by:bruno
ID: 7152740
Glad I could help!  Thanks for the A.  :-)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question