Assume I have this codes:
<div class="mother">
<div class="r">r
</div>
<br>
<div class="l">l
</div>
<br>
<div class="r">r
</div>
<br>
<div class="l">l
</div>
</div>
And the css:
.r {
display: inline;
}
.l {
display: inline;
}
I want all of the .r
<div>
s to be rendered at the right side of .mother
and all of the .l
<div>
s at the left side. something like float: right/left;
but I don't want to use float
. I want to use a smart text-align
.
I tried text-align; right/left;
for .mother
but all of them will have the same align, all left or all right. How can I tell .mother
that your text-align
must be left
for .l
s and right
for .r
s?