1

I created this jsfiddle to demonstrate my problem https://jsfiddle.net/7spz9a57/4/ The two buttons are inside a div with the class buttonholder the buttons are simple <a> tags with the class button. i found out that when i add

.button {
...
float: left;
...
}

to my css the buttonholder div isn't wrapping the <a> tags anymore. I really have no idea why. I don't want to give buttonholder a fixed sice :/

1 Answers1

2

You need to clear the float, as floated elements do not take up. You need to give the parent:

.parent {overflow: hidden;}
Praveen Kumar Purushothaman
  • 164,888
  • 24
  • 203
  • 252
  • Okay, why? Because? (Yes, I know; the OP clearly doesn't. And won't learn anything from this answer as currently written, except that `overflow: hidden` is magic that sometimes works.) – David Thomas Dec 28 '15 at 17:23