Reputation: 1443
Check out my problem with this fiddle:
Both the select
and the img
tag are set to have the same heights.
And yet this is not making them appear "on same line".
It is as if the select box prefer being aligned 'bottomly' vertically...
Does anyone have a tip?
Thanks in advance!
Edit: Thanks all. I accepted the answer that was first and worked. All others got +1 for their answer... Awesome!
Upvotes: 1
Views: 1867
Reputation: 2575
Add a float to your image. See below:
#testdiv img {
border:1px solid black;
width:25px;
height:25px;
float: left;
}
Upvotes: 1
Reputation: 186762
#testdiv img {
border:1px solid black;
width:25px;
vertical-align:top;
height:25px;
}
Try specifying vertical-align.
Upvotes: 2