How to float elements inside a container
问题 I am trying to put the #container in the center of the screen and make the 'charts' float:left inside the #container . But with the code I have below, the 'charts' locate under the #container . Can anyone tell me how can I change the code? And tell me why the code make the 'charts' outside the #container . #container { margin: auto; width: 10%; border: 3px solid #73AD21; padding: 10px; } #id1, #id2, #id3, #id4 { float: left; font-size: 30px; } <div id="container"> <div id="id1"> <p>chart1</p>