Html Display Div In Same Line
I wish to display a text on my jsp page: Sample date: So I want it to be displayed as Sample date: 29-Aug-2012 But it is coming up like this: Sample D
Solution 1:
Write it as -
Sample date: <span id="sampleDate"></span>
I won't recommend this but still if you want to keep DIV then you have to make it inline element -
Sample date: <div id="sampleDate"></div>
#sampleDate{ display: inline; }
Solution 2:
You can use css #sampleDate{display:inline;}
. But you should use @Dipaks method, by using a span tag.
View live here http://jsfiddle.net/WkNp8/1/
Post a Comment for "Html Display Div In Same Line"