How to make div fit only itā€™s content without using inline-block? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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 Resposta
0
probably u want width(or height): max-content
12th Jul 2020, 4:17 AM
durian
durian - avatar