No newline after div?

Oliver picture Oliver · Jan 25, 2011 · Viewed 106.1k times · Source

Is there a way to not have a newline inserted before a div without using float: left on the previous element?

Maybe some tag on the div that will just put it to the right?

Answer

alex picture alex · Jan 25, 2011

There is no newline, just the div is a block element.

You can make the div inline by adding display: inline, which may be what you want.