Jason Joy
Jason Joy

Reputation: 1

I cant put the pictures and text inline properly

how can I put text beside picture without disturbing the other content?

this is a header

html

 <div>
    <img src="logo.ico" width="300px" height="200px" alt="logo"/>
    <h1 class="header">Movies19</h1>
 </div>

Upvotes: 0

Views: 53

Answers (3)

Gokul P P
Gokul P P

Reputation: 962

you can add the two elements in the div to display:inline-block tag

.line>* {
  display: inline-block;
}
h1 {
  vertical-align: middle;
  height: 200px;
  margin: 0;
}
<div class="line">
  <img src="http://placehold.it/300x200" width="300px" height="200px" alt="logo" />
  <h1 class="header">Mo</h1>
</div>

Upvotes: 1

karthik
karthik

Reputation: 159

<div>
<table>
<tr>
<td>
    <img src="logo.ico" width="300px" height="200px" alt="logo" />
	</td>
	<td>
    <h1 class="header">Movies19</h1>
	</td>
	</tr>
	</table>
 </div>

Upvotes: 0

I_Al-thamary
I_Al-thamary

Reputation: 4043

Use this

<style type="text/css">
   img {
    display: inline-block;
   }
</style>

look at this link it may help more: http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_img_default_css

Upvotes: 0

Related Questions