user384080
user384080

Reputation: 4692

background image css

newbie question but i can't figure it out:

How to make the background image covers the whole page but no repeat?

thanks

Upvotes: 0

Views: 111

Answers (2)

Sarfraz
Sarfraz

Reputation: 382696

.

body{
  background-image:url(path to image) no-repeat left top
}

Your image should be large enough because you are not repeating it.

Upvotes: 1

meder omuraliev
meder omuraliev

Reputation: 186562

* { margin:0; padding:0; }
body { background:url(/file.jpg) no-repeat top center; }

If it looks off you probably need more heightness.

html, body { height:100%; }

Upvotes: 0

Related Questions