Have border wrap around text

后端 未结 4 800
说谎
说谎 2021-01-01 12:53

Suppose I have a div with some text in it

Title&

4条回答
  •  不知归路
    2021-01-01 13:03

    Not sure, if that's what you want, but you could make the inner div an inline-element. This way the border should be wrapped only around the text. Even better than that is to use an inline-element for your title.

    Solution 1

    Title

    Solution 2

    Title

    Edit: Strange, SO doesn't interpret my code-examples correctly as block, so I had to use inline-code-method.

提交回复
热议问题