<div dir="ltr" class="outer">
<div class="inner"></div>
</div>
<div dir="rtl" class="outer">
<div class="inner"></div>
</div>
<div class="outer vertical-lr">
<div class="inner"></div>
</div>
<div class="outer vertical-rl">
<div class="inner"></div>
</div>
.outer {
border: solid 4px black;
block-size: 100px;
inline-size: 100px;
position: relative;
}
.inner {
block-size: 20px;
inline-size: 20px;
background-color: #4A90E2;
position: absolute;
inset-block-end: 4px;
inset-inline-end: 20px;
}
.vertical-rl {
writing-mode: vertical-rl;
}
.vertical-lr {
writing-mode: vertical-lr;
}
body {
display: flex;
flex-wrap: wrap;
gap: 16px;
margin: 16px;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.