.gitHubButton { position: fixed; top: 12px; right: 12px; } @media screen and (max-width: 900px) { .gitHubButton { position: absolute; } } @media screen and (max-width: 500px) { .gitHubButton { top: 8px; right: 8px; } }