GitHub 6956★

Have you seen CSS Scan?

The fastest and easiest way to check, copy and edit CSS.

Learn more →

CSS Scan logo

Docked at corner

HTML

<div class="docked-at-corner">
<!-- Docked at the top right corner -->
<div class="docked-at-corner__docker"></div>
</div>

CSS

.docked-at-corner {
position: relative;
}
.docked-at-corner__docker {
position: absolute;
right: 0;
top: 0;
transform: translate(50%, -50%);

/* Center the content */
align-items: center;
display: flex;
justify-content: center;
}
Demo
Follow me on and to get more useful contents.