-4
As the question had no details, I created a model from the image:
I believed a div
with the class="pictureContainer"
and assigns it the following style:
.pictureContainer{
width: 400px;
height: auto; !important
position: relative; !important
}
Inside that div I created an image with a width: 100%
. And I created a div
with a class="pictureText"
, with this style:
.pictureContainer .pictureText{
width: 100%;
height: 40%;
background: rgba(0, 0, 0, 0.5);
position: absolute; !important
bottom: 0; !important
}
And inside that div
I created a p
:
.pictureContainer .pictureText p{
padding: 10px;
position: absolute; !important
bottom: 0; !important
color: #fff;
}
It is fully responsive and proportional, just change the width
of div.pictureContainer
and the rest will suit.
Complete code
*{
margin: 0;
padding: 0;
}
.pictureContainer{
width: 400px;
height: auto;
position: relative;
}
.pictureContainer img{
width: 100%;
}
.pictureContainer .pictureText{
width: 100%;
height: 40%;
background: rgba(0, 0, 0, 0.5);
position: absolute;
bottom: 0;
}
.pictureContainer .pictureText p{
padding: 10px;
position: absolute;
bottom: 0;
color: #fff;
}
<div class="pictureContainer" >
<img src="http://www.novosaplicativos.com.br/wp-content/uploads/2015/11/anonymous-isis-bitcoin-opisis.jpg" alt="">
<div class="pictureText" >
<p>Hacker descobre evidências de que os EUA teriam espaçonave de guerra.</p>
</div>
</div>
You could explain better what you want, got a little vague...
– Samir Braga
the example in the photo is perfect friend
– Kleber Souza
I need it to look like photo 3
– Kleber Souza
You could post your code?
– Samir Braga