0
I’ve done this so far:
*{margin:0;padding:0;}
.container{
width:700px;
}
.image img{
margin-right:15px;
float:left;
width: 300px;
height: 225px;
object-fit: cover;
position: relative;
background:#333;
}
.container p{
font-size:20px;
width: 370px;
text-align: justify;
display: inline-block;
vertical-align: top;
}
.comment-box{
height:50px;
width: 300px;
line-height: 2.3em;
font-weight: 700;
background: #D8DFE3;
text-align: center;
}
<div class="container">
<div class="image">
<img src="">
</div>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</p>
<div class="comment-box">Comentários</div>
</div>
I’d like the element .comment-box
is not separated from the picture, image of what I am trying to achieve:
Your fiddle is working.
– Marconi
I see no problem in the structure, but if you are starting in html and css I suggest you already take a look at css frameworks, a popular and very easy is the bootstrap, he helps you in these times, not to do everything by hand
– jbrunoxd
But the comment box gets an unwanted margin.
– Pedro M.
Related http://answall.com/questions/91606/colocar-texto-imagesideText
– Rafael Kendrik
Good morning to all, although Pedro’s question is poorly worded and does not explain the real problem (supposed margin below the image), I voted to leave it open as this question is not a duplicate of http://answall.com/q/91606/3635, however Pedro I suggest you explain the problem better next time, because your questions may be closed for other reasons.
– Guilherme Nascimento