How to prevent a div's content to start a new line

<>

This question already has an answer here:

Answers


Use overflow: hidden and white-space: nowrap in your div style.

<div id="divId">this is my content</div>

And in css part

# divId {
    width:450px;
    overflow: hidden;
    white-space: nowrap;
}

Check out this Fiddle


Use word-wrap:break-word

<div id="divId">this is my content</div>

# divId {
width:450px;
word-wrap:break-word;
}

Need Your Help

Clean Working directory of Tomcat in Eclipse

java eclipse tomcat servlets

When I work in on an servlet application in Eclipse, I have to choose Clean Working Directory in the server tab of Eclipse for the changes to be visible in the browser. Is there any way to make sur...