1
I have a div with material bootstrap design of size 4 col-md-4
that aligns right my texts using text-align: right
The problem is that in the same line this text has an icon, which is also aligning to the right but with the float: right
.
My text and my icon are very close, I would like to add a margin in my text to the left, so that it distances a little from my icon of "x".
Follow picture:
Follow my html and responsible css:
<div class="row">
<div class="col-12 col-md-4">
<span class="tituloAtributo">Tamanho</span> <i class="fa fa-close iconeexcluiatributo" aria-hidden="true"></i>
<br>
<span class="atributo">P</span>
</div>
<div class="col-12 col-md-4 alinhacentro">
<span class="tituloAtributo">Cor</span> <i class="fa fa-close iconeexcluiatributo" aria-hidden="true"></i>
<br>
<span class="atributo">Cinza</span>
</div>
<div class="col-12 col-md-4 alinhadireita">
<span class="tituloAtributo">Cor</span> <i class="fa fa-close iconeexcluiatributo" aria-hidden="true"></i>
<br>
<span class="atributo">Rosa</span>
</div>
</div>
My css:
.alinhadireita{
text-align: right;
}
.iconeexcluiatributo{
color: #C62828;
font-size: 14px!important;
float: right;
}
How can I add a margin between this x button so it doesn’t destroy my responsiveness?
It worked partially. But on the bottom line, in the "pink" case, I had to winter, so two classes were created: . ultimoelementocolumn{ margin-right: 10px; } . ultimoelementocolunacomclose{ margin-left: 10px; ;}
– veroneseComS
@Renaotpls this happened pq vc broke the line with a BR, but his reasoning was correct, it was only clone the margin-left for the text of the second line :D
– hugocsl