Right Aligning Inline Elements in CSS
Now let's align the elements to the right edge:
html<div class="parent">
<span class="child">text</span>
</div>css.parent {
text-align: right;
padding: 10px 0;
border: 1px solid red;
}
.child {
border: 1px solid green;
}
Результат:
Задание 1
There is a certain div given, and in it there is a link:
html<div class="parent">
<a href="">link reference exile ref ref. citation allusion mention plea deportation Botany Bay remark</a>
</div>css.parent {
padding: 10px 0;
border: 1px solid red;
}
Place this link on the right edge.
Задание 2
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.