Prevent line break?

Solved
Kopros Posted messages 631 Status Member -  
Kopros Posted messages 631 Status Member -
Hi everyone,

So here it is, on a page I have a div whose width I defined in css (width: 250px;).
Inside this div, there is a table, and I use JavaScript to add rows to this table.

My goal is for the contents of a row in the table to fit in a single displayed line.
In my css, I therefore set overflow: auto; for the div in question.
The overflow works well if there are no spaces in the content, and if there are no html tags in the row of the table (which is not the case). As soon as there is a space, or for example an , the rest of the content goes to the next line.

How can I make everything stay on a single line?

Configuration: Linux Fedora / Firefox 3.6.12

2 answers

  1. Metallica51 Posted messages 27 Registration date   Status Member Last intervention   39
     
    Try using the CSS property white-space that prevents automatic line breaks.

    white-space: nowrap


    Best regards,
    Metallica51.
    35