0
I have the following div:
<div class="row">
<div class="col-lg-4 mb-4">
<div class="row">
<div class="col-lg-12 col-md-12 text-center"><img src="imagens/interprete.jpg" class="img-responsive"></div>
</div>
<div class="row">
<div class="col-lg-12 col-md-12">
<div class="row">
<div class="col-md-7 col-sm-7 text-center texto-descricao">
<span class="titulo-conteudo">DIRETAMENTE DO BOREL</span><br>
<span class="texto-conteudo">Wantuir foi escolhido o Melhor Intérprete do Grupo Especial e fatura Prêmio S@amba-Net 2019</span>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-4 mb-4">
<div class="row">
<div class="col-lg-12 col-md-12 text-center"><img src="imagens/interprete.jpg" class="img-responsive"></div>
</div>
<div class="row">
<div class="col-lg-12 col-md-12">
<div class="row">
<div class="col-md-7 col-sm-7 text-center texto-descricao">
<span class="titulo-conteudo">DIRETAMENTE DO BOREL</span><br>
<span class="texto-conteudo">Wantuir foi escolhido o Melhor Intérprete do Grupo Especial e fatura Prêmio S@amba-Net 2019</span>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-4 mb-4">
<div class="row">
<div class="col-lg-12 col-md-12 text-center"><img src="imagens/interprete.jpg" class="img-responsive"></div>
</div>
<div class="row">
<div class="col-lg-12 col-md-12">
<div class="row">
<div class="col-md-7 col-sm-7 text-center texto-descricao">
<span class="titulo-conteudo">DIRETAMENTE DO BOREL</span><br>
<span class="texto-conteudo">Wantuir foi escolhido o Melhor Intérprete do Grupo Especial e fatura Prêmio S@amba-Net 2019</span>
</div>
</div>
</div>
</div>
</div>
</div>
But when I see this div on the Moto G3 smartphone and another Samsung Galaxy J4+ with the larger screen, this div appears in different positions. I’ve tried to adjust it this way:
.texto-descricao{
margin-top: -50px;
margin-left: 13%;
background-color: #FFD400;
padding: 10px
}
@media only screen and (max-width: 540px) {
.texto-descricao{
margin-top: -50px;
width: 300px;
margin-left:30%;
background-color: #FFD400;
padding: 10px
}
}
@media only screen and (max-width: 600px) {
.texto-descricao{
margin-top: -50px;
width: 300px;
margin-left:30%;
background-color: #FFD400;
padding: 10px
}
}
But it didn’t work, only on max-width: 600px
has taken effect on both. How can I make div appear in the same position regardless of the device? px
, but it didn’t work either!
Dude this your grid is very strange, you should not go putting a
col
inside the other like you did, you can even dorow>col>row>col
but notcol>col>col
onecol
has to be the daughter of arow
.... before thinking about doing this @media, maybe you should review this grid– hugocsl
Hello Hugo. Right. I made the adjustment, but it’s still giving this incompatibility. The main row has 03 columns and within each column I did what you suggested.
– user24136