Hi, i have recently discover a CSS coding pattern named as flexbox , it can do floating stuff , margin stuff easily by a line or two codes. Parent div should have the css {display:flex;} and you can play around with the variables here :- https://codepen.io/osublake/pen/dMLQJr