0

How do I add a background image with css

I'm a CSS beginner and I want to know how to use an image as background in a web document. Thanks

5th Feb 2019, 4:50 PM
Precious
Precious - avatar
2 Answers
+ 2
if you want have an image as background on a div who have the id=example : #example { background-image: url(example.jpg) } but your picture need to be in the same document as your html and css i hope it’s clear :^)
5th Feb 2019, 5:11 PM
Axel Slb
Axel Slb - avatar
+ 1
Yes, thanks a lot Axel Salenbier
5th Feb 2019, 5:21 PM
Precious
Precious - avatar