Skip to content Skip to sidebar Skip to footer

How To Place Text And Image Next To Each Other?

How can I do something like this? My HTML:

TITLE

Descript

Solution 1:

Use css Flex. Add display: flex on .content.

.content {
  display: flex;
}

.contentimg {
  margin-right: 10px;
  display: block;
}

.contenth3,
.contentp {margin: 0;}
<divclass="content"><imgsrc="somesrc"><divclass="text"><h3><strong>TITLE</strong></h3><p>Description</p></div></div>

Solution 2:

In Html

<div class="content">
       <imgsrc="somesrc"><h3><strong>TITLE</strong></h3><p>Description</p></div>

in CSS

.content, img{
  display:inline-block;
}

Post a Comment for "How To Place Text And Image Next To Each Other?"