0
Inline-block not working
Hi I want four columns that completely cover the page. I thought if I put four diva In div container and made them all inline block this would work if I put the width at 25 percent for each div element. But they just stack. How can I make them side by side? Without using flex or grid. Thanks. <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> div { Width:auto; background-color: red; color: yellow; Display: inline-block; } </style> </head> <body> <div> <div style="background-color: black;" width="50%">これ </div> <div width="40%" >なに</div> </div> </body> </html>
4 Réponses
+ 3
Set the columns property to float.
0
Don't know what you mean
0
I'm sure you don't need the float
0
I tried to put columns: float; and it didn't do anything in the div class