How can I make a div not larger than its contents?

前端 未结 30 3620
青春惊慌失措
青春惊慌失措 2020-11-21 07:35

I have a layout similar to:

I would like for the div to only exp

30条回答
  •  说谎
    说谎 (楼主)
    2020-11-21 08:18

    You can do it simply by using display: inline; (or white-space: nowrap;).

    I hope you find this useful.

提交回复
热议问题