Text floating in block next to image

.content {
    width: 400px;
    border: 4px solid red;
    padding: 20px;
    overflow: hidden;
}

.content img {
    margin-right: 15px;
    float: left;
}

.content h3,
.content p{
    margin-left: 15px;
    display: block;
    margin: 2px 0 0 0;
}
<div class="content">
    <img src="http://cdn4.iconfinder.com/data/icons/socialmediaicons_v120/48/google.png"/ alt="" >
    <h3>Title</h3>
    <p>Some Description</p>
</div>​

well you can try the classic way using tables although it is not recommended to use tables for layout

<table>
  <tr>
    <th><img src="yourimage" /> </th>
    <th >adsasd<br/>adas</th>
  </tr>
</table>

Hi why used to float left you can do this without used float as like this

<div class="res">
<img src="<?php echo 'img/'.$row["sType"].'.png';?>"/>
<div class="text"><h5>TITLEe</h5>
  <p>Description</p></div>
</div>  

Css

    .res {
    height:60px;
    background-color:yellow;
    border-bottom:1px solid black;
}
img, .text{
vertical-align:top;
}
.text{
display:inline-block;
}
p, h5{
margin:0;
  padding:0;
}

and change to css, class according to your design

Tags:

Html

Css