+ 2

How to make div fit only it’s content without using inline-block?

I know I can use inline block to make a div no bigger than its contents, but that’s causing other problems in my code. Is there any alternative so that the div can be no larger than its contents? Two back to back questions, hooray :)

12th Jul 2020, 2:15 AM
Coder
Coder - avatar
1 ответ
0
probably u want width(or height): max-content
12th Jul 2020, 4:17 AM
durian
durian - avatar