I have a layout similar to:
I would like for the div
to only exp
OK, in many cases you even don't need to do anything as by default div has height
and width
as auto, but if it's not your case, applying inline-block
display gonna work for you... look at the code I create for you and it's do what you looking for:
div {
display: inline-block;
}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ultrices feugiat massa sed laoreet. Maecenas et magna egestas, facilisis purus quis, vestibulum nibh.
Nunc auctor aliquam est ac viverra. Sed enim nisi, feugiat sed accumsan eu, convallis eget felis. Pellentesque consequat eu leo nec pharetra. Aenean interdum enim dapibus diam.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ultrices feugiat massa sed laoreet. Maecenas et magna egestas, facilisis purus quis, vestibulum nibh.