Reputation: 37
I have placed an image within the <header>
tags of my code, but the image is cutting right through it and the header is not expanding to the size of the image. The code goes something like this:
<header>
<img src="the_image.png" style="position:relative; align:right; float:right; width:40%; height:inherit" />
</header>
The header Style is as follows:
header
{
position:relative;
width:Auto;
height:auto;
max-height:239px;
min-height:inherit;
background:#FFFFFF;
}
Does it have anything to do with the position I am using? Why does the header simply not expand to come to the size of the image (which is the maximum height that I have given)?
Upvotes: 1
Views: 49
Reputation: 752
width: Auto;
is incorrect, it should be width: auto;
Have you tried this?
Update:
As a comment before mentioned, you might have missed overflow: hidden;
Here's the fiddle: http://jsfiddle.net/z707x908/1/
Upvotes: 2