Left/Right float button inside div
css, html
Solution
Change display:inline to display:inline-block
.test {
width:200px;
display:inline-block;
overflow: auto;
white-space: nowrap;
margin:0px auto;
border:1px red solid;
}
Problem
How can I make button float only in div area? Here is my example CSS and HTML. ``` .test { width: 60%; display: inline; overflow: auto; white-space: nowrap; margin: 0px auto; } ``` ``` <div class='test'> <div style='float: left;'> <button>test</button> </div> <div style='float: right;'> <button>test</button> </div> </div> ``` I want it to be like this.