26 May 2013

Bringing Html Elements Into Single Line

Sometimes HTML elements even though we have not applied breaks they move into separate lines so if we have to bring them into a single line the following is the code:-

The following brings 3 div's into a single line:-

<div>
<div style="display:inline-block"> happy home</div>
<div style="display:inline-block"> singapoore</div>
<div style="display:inline-block"> India </div>
</div>

Output of the above code:-

happy home 
singapoore 
India


Post a Comment