div align right

1

I'm trying to align this div on how much right of the screen and it stays on the left only

    <div class="tres">
<iframe data-aa='861335' src='#' scrolling='no' style='width:120px; height:60px; border:0px; padding:0;overflow:hidden' allowtransparency='true'></iframe>
</div>

Used css

div.tres {
 position: absolute;
 justify-content: center;
 align-items: center;
 background-color:  gray;
 border: 2px solid; /* As 4 bordas sólidas com 25px de espessura */
 border-color: gray  gray gray  gray; /* cores: topo, direita, inferior, esquerda */
 }

div.tres {
 position: absolute;
 justify-content: center;
 align-items: center;
 background-color:  gray;
 border: 2px solid; /* As 4 bordas sólidas com 25px de espessura */
 border-color: gray  gray gray  gray; /* cores: topo, direita, inferior, esquerda */
 }
<div class="tres">
<iframe data-aa='861335' src='#' scrolling='no' style='width:120px; height:60px; border:0px; padding:0;overflow:hidden' allowtransparency='true'></iframe>
</div>
    
asked by anonymous 14.03.2018 / 18:52

2 answers

2
div.tres {
 float: right;
 justify-content: center;
 align-items: center;
 background-color:  gray;
 border: 2px solid;
 border-color: gray  gray gray  gray; 
 }
    
14.03.2018 / 19:06
0

Just add a right : 0 , if you want to remain in absolute behavior ...

div.tres {
 position: absolute;
 right: 0;
 justify-content: center;
 align-items: center;
 background-color:  gray;
 border: 2px solid; /* As 4 bordas sólidas com 25px de espessura */
 border-color: gray  gray gray  gray; /* cores: topo, direita, inferior, esquerda */
 }
<div class="tres">
<iframe data-aa='861335' src='#' scrolling='no' style='width:120px; height:60px; border:0px; padding:0;overflow:hidden' allowtransparency='true'></iframe>
</div>
    
14.03.2018 / 19:08