+ 1

How to add a Background in css from my local disk?!

hi guys please tell me how can I add a image background using css from my local drive? background-image:url ("example.jpg") it doesnt work :(

16th Aug 2017, 6:26 PM
SonOfTech
SonOfTech - avatar
8 Réponses
+ 1
where is your css? in playground or in local storage?
16th Aug 2017, 6:37 PM
Yaroslav Pieskov
Yaroslav Pieskov - avatar
0
In my PC (nete pad)
16th Aug 2017, 6:42 PM
SonOfTech
SonOfTech - avatar
0
to make url("example.jpg") work, your css file and example.jpg must to be in same directory
16th Aug 2017, 6:44 PM
Yaroslav Pieskov
Yaroslav Pieskov - avatar
0
can't be inline css?
16th Aug 2017, 6:46 PM
SonOfTech
SonOfTech - avatar
0
if you have folders like "css" and "img" in your project folder - path to your image must be like "../img/example.jpg"
16th Aug 2017, 6:46 PM
Yaroslav Pieskov
Yaroslav Pieskov - avatar
0
if it inline - your html file and image must be in same folder
16th Aug 2017, 6:48 PM
Yaroslav Pieskov
Yaroslav Pieskov - avatar
0
Ok got it . thank u my friend ♡
16th Aug 2017, 6:54 PM
SonOfTech
SonOfTech - avatar
0
no problem
16th Aug 2017, 6:55 PM
Yaroslav Pieskov
Yaroslav Pieskov - avatar