0
Shouldn't the div expand to fit around the buttons?
https://code.sololearn.com/WyK7jXgQdVXE/?ref=app How can I make the div fit perfectly around the buttons? Also, shouldn't it already do that?
3 Respostas
+ 3
If this helps
https://code.sololearn.com/WnrYt6Xq2QtT/?ref=app
+ 1
Divs with no content and no borders take up no space. That's why there's something called a clearfix hack. There are many versions of it. None are perfect (thus "hack") so you should tweak it to suit your specific purposes.
Here's one of many places available to get started researching:
https://css-tricks.com/tag/clearfix/
0
Guys. I fixed it. I just removed the centering on the div and the float:left; on the back button.
Here's the updated code:
https://code.sololearn.com/WyK7jXgQdVXE/#html