How to have image and text side by side

 How to have image and text side by side:




image and text side by side
Lots of people are asking how they can put image and text side by side. Just make sure you are using style and classes properly. 

<html>
<title>
How to have image and text side by side
</title>
<style>
.icon {
 margin-left:2%;
float:left; 
height:60px;
width:100%; 

.container2 {
    width:auto;
    height:auto;
    padding:1%;
    float:left;
}
h4{margin:0}
.left {float:left;width:60px;}
.right {float:left;margin:0 0 0 5px;width:215px;}

</style>
<body>


</body>

</html>

<div class='container2'>
        <div class="left">
            <img src='https://images-na.ssl-images-amazon.com/images/I/31ArOQ2bqHL.jpg' class='icon'>
        </div>  
    <div   class="right" >
    <h4>Twitter</h4>
    <div style="font-size:.7em;width:180px;float:left;">Twitter is an American microblogging and social networking service
    <br><b>CEO: </b>Parag Agrawal</div>
    </div>
</div>


0 comments:

Post a Comment