Min-width, max-width css use smallest width

前端 未结 3 1921
野的像风
野的像风 2021-01-05 05:26

Alright, so what I\'m hoping to do is to create a DIV that will autosize based on the content that\'s in it, but it should use the smallest width possible. I haven\'t a clue

3条回答
  •  耶瑟儿~
    2021-01-05 06:22

    If I understood what you're asking about correctly,

    s are block-elements, which means that by default they'll take a up a whole line -- 100% of the screen width. Try using the element instead.

    Hope that helped, but we can help you more if you specify what behavior you're trying to do or achieve.

提交回复
热议问题