You can use CSS attribute 'display' like below
number' <div id="theDiv" style="display:inline">5</
Or use <span> tag instead of <div>
number' <span id="theDiv">5</span>:
Main Topics
Browse All Topicsi got a div
<div id="theDiv" style="width:20px;"></div>
it is actually output of a script value
so the div is actually one word.
i need to place word before it and after it in one line\row
but now its braking everything before\after
suppose the value that was picked is 5,
i want to have:
number' 5:
(in one row)
now i have:
number'
5
:
(in 3 rows)
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: luoshibenPosted on 2008-06-28 at 01:15:21ID: 21889845
I am not sure if I fully understand the situation -- is all of the text inside of the DIV tags, or does the HTML look more like "number <div id="theDiv" style="width:20px;">5</div >:"? Being able to see a snippet of all the HTML surrounding the div (at least the containing element) would help to know the best way to solve the problem.
ags/tag_DI V.asp) To get you started, you could either change the <div> into a <span>, or add "display:inline" to your DIV's style, like so: inline"></ div>
If not all of your text is inside of the DIV tags, keep in mind that a DIV is a block-level element and therefore automatically creates a "new line" after it. (See: http://www.w3schools.com/t
<div id="theDiv" style="width:20px;display:
Again, being able to see the entire page would help, but the problem could also be in part due to other elements on the page that are limiting the horizontal space available for the div stretch out on one line. In other words, if your line is "number 5:" and is a total of 50px wide, but the containing element is set to 40px, the line could wrap.
Lastly, if all of your text is inside of your DIV tags, the problem is most likely tied to the fact that you have "width: 20px" defined in the DIV's style, but the text "number 5:" is larger than 20px (depending on what font size you are using.
I hope that some of this information helps. If you're still unclear as to how to solve the problem, please provide a sample of the code on the page you are working with so that I may provide a more specific solution. Best of luck!