1
I have the logo and a black triangle background. How to position the logo forever stay in the center of the triangle even changing the resolution?
<img class="img-responsive triangulo-laranja" src="{{ asset('storage/triangulo.fw.png') }}">
<div class="img-responsive triangulo-logo">
<img class="img-responsive logo" src="{{ asset('storage/logo.png') }}">
</div>
.triangulo-laranja {
position: absolute;
top: 0;
left: 0;
z-index: 997;
width: 85%;
height: 90%;
opacity: 0.85;
}
.triangulo-logo {
background-image: url('../../storage/triangulo-logo.fw.png');
position: absolute;
top: 0;
left: 8%;
z-index: 998;
width: 600px;
height: 200px;
}
.logo {
position: relative;
top: 0;
left: 50%;
margin-left: -95px;
z-index: 999;
}
Perhaps you already thought that, but in any case... it would not be more interesting to add the logo to the image?
– Mathiasfc
Yes, I did, but for design reasons I’m trying to do the positioning with separate images.
– Marcelo
I understood, I imagined this, Marcelo by chance you could not create a snippet(Ctrl+M in the question edition), only with the part that interests us, showing the problem actually happening, would be better p/ help you.
– Mathiasfc
At first it is correct, the logo is centered on the triangle. When changing the orientation (in case iphone 6 the logo is not centered on the triangle.
– Marcelo