how do i make a pictre fit in the entire div
when i create a div with css the picture wont fit fully inside it.
it will shrink instead.
an image how it currently looks like
http://img90.imageshack.us/img90/510/pictureframe.png
css part
#avatar{
padding:35px;
height:70px;
width:50px;
margin: 0px 0 0 0px;
background-color:red;
}
html part
<div id="avatar">
<img src="/Avatar.png" style="width: 100%;" style="height: 100%;" alt="">
</div>
You are using 2 style attributes, so the latter 1 will take over the first 1, so it’s only setting the height and not the width to 100%
And just noticed your CSS, you are using padding so that will make the red background visible around your image
Demo