div{ background: #39c; width: 50px; height: 50px; position: absolute; top: 0; left: 0; } #div2{ top: 0; left: 60px; } body{ height: 2000px; } #time{ padding: 5px; float:right; color: red; } #time2{ padding: 5px; float:right; color: black; }