You can apply float:left
on the div
.
div#buttons {
border:1px solid black;
width:inherit;
max-height:inherit;
float:left;
}
Note that depending on your complete code, you may need to clear the float on the HTML that comes after this by applying clear:left
.