Reputation: 2523
I'm trying to place this picture at the background of my page in a div
. I'm trying to make it full screen "in width". so the size of the picture is 980x420
, but it just simply doesn't work. I know I'm missing something but I can't find it anywhere.
CSS
.Sil{
max-width: 100%;
height: 300px;
background: url(../Images/TALENT.png) no-repeat;
}
HTML
<div class="Sil"></div>
Upvotes: 0
Views: 2474
Reputation: 1684
There is a possibility your image is smaller than 980px. If that's the case you can change from max-width: 100%;
to become width: 100%'. Other option is to use
background-size: cover;`
Upvotes: 1