Reputation: 115
I have an image that i have displaying at top of the webpage.Now i want to show one menu button id beside to the image but i am not able to do it.Menu button is coming down in next line..
Here is the HTML..
<img src="images/hotelAwadh.png" alt="logo" width="150" height="50">
<div id="result_data"></div>
How to display <div id="result_data"></div>
beside to img
.
Please help me ..
Upvotes: 0
Views: 370
Reputation: 12138
div
is a block element and it takes 100% width by default. img
is an inline element by default and it occupies its very specific width/height. what you have to do is overwrite their default behaviours with display:inline
and display:block
img {float:left;display:block}
div#result_data {float:left;display:inline;}
Upvotes: 0