.responsive-license-cc { clear: both; text-align: center; box-sizing: border-box; width: 100%; justify-content: space-around; align-items: center; margin: 0.5em auto; /*background-color: #f9f9f9; border: 2px solid #e0e0e0;*/ border-spacing: 8px; display: flex; } .responsive-license-cc div { margin: 4px; } .rlicense-text div { margin: 0.5em auto; } @media screen and (max-width: 640px) { /* For mobile devices */ .responsive-license-cc { flex-flow: column; } .rlicense-text { order: 1; } }