...

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



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

glenngv
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, ....



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum