View Full Version : How to prevent <div> from separating another line

03-22-2004, 10:21 AM
I use:
*Guaranteed Cash Value:$<div onClick="javascript:this.innerHTML='1111'">4,029</div>at age of 65.
I only want to change money when click though I know by changing the innerHTML use whole sentence.

03-22-2004, 10:30 AM
Use <span> instead of <div>.
<div>s (just like <table>, <p>) are block elements so, they are supposed to display in another line. Although you can change the display property to inline, it is still recommended to use tags properly. <p> for paragraphs, <div> for divisions, ....