+ 3
How do I make a picture fit into the background of my webpage using CSS?
I used the background-image: {...} property but it didn't fit into my browser. The image got cut in half vertically and repeated itself horizontally. Now I'm curious to know if there's a specific height and width to fit in perfectly.
6 odpowiedzi
+ 7
try these
background-size: 100% 100%;
background-repeat: no-repeat;
and optionally
background-attachment: fixed;
+ 2
No problem :)
However, try googling these next time, this was the first result
+ 1
Lovely
0
It worked...Thanks
0
Background-cover:fit;
Background-repeat:no-repeat;
0
just try
background-size: cover;
background-repeat: no-repeat;