Right Aligning Inline Elements in CSS
Now let's align the elements to the right edge:
<div class="parent">
<span class="child">text</span>
</div>
.parent {
text-align: right;
padding: 10px 0;
border: 1px solid red;
}
.child {
border: 1px solid green;
}
:
There is a certain div given, and in it there is a link:
<div class="parent">
<a href="">link reference exile ref ref. citation allusion mention plea deportation Botany Bay remark</a>
</div>
.parent {
padding: 10px 0;
border: 1px solid red;
}
Place this link on the right edge.
Modify the previous task so that the link is not pressed tightly against the right edge. To do this, add right padding to the parent element.