Spherehunter
Spherehunter

Reputation: 37

how to scale my image - responsive design

I can't manage to make the image (logo) on my website (www.seandorsman.nl) scaleable. I'm using the following CSS:

.logo
{       
height: auto;
width: 100%;
max-width: 920px;
background-color:#0FF;
margin-left:auto;
margin-right:auto;
}

And the following HTML:

<div class = "logo" >
<img src = "images/logo.png"/>
</div>

I have been looking on the web and all I can find is that i need to use

width:100%;
height:auto;
max-width:920px;

What am I doing wrong, why doesn't the image scale?

PS. You can also check my website for the full code.

Upvotes: 1

Views: 65

Answers (1)

TimCodes.NET
TimCodes.NET

Reputation: 4699

Wrong way around (well, I guess it doesn't matter but I would do it this way). Try:

width:920px;
height:auto;
max-width:100%;
display: block; /*for IE*/

This needs to be on the image itself, not the wrapper for the image

Upvotes: 1

Related Questions