I wish to display a text on my jsp page:
Sample date: <div id="sampleDate"/>
So I want it to be displayed as Sample date: 29-Aug-2012
But it is coming up like this:
Sample Date:
29-Aug-2012
Can anyone help me with this?
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; }
css for sampleDate should be
#sampleDate {
display:inline;
}
Also you could use float:left; for Sample date: and for #sampleDate block float:right;
put both blocks inside other block and set width ( then there wont be a huge space between these two )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With