.box-one { width: 100px; margin: 0 auto; } .box-two { width: 100px; margin-left: auto; margin-right: auto; }