0
Background-image problem
guys is there any limitation of the picture size ? i mean i have a 4k picture but i doesn't upload it in my div using background-image rule what should i do ?
17 Answers
+ 1
The problem is, that the URL is not in quotes. You need to use url("path"), with the path to the image in quotes. Modern browsers block local file access, and you can't use Windows backslashes to access files. Put the file into the same directory as the html file, and load it like url("cpu1.jpg")
+ 1
There is no limit. What does your background-image definition look like?
+ 1
Can you paste the complete CSS rule?
+ 1
No problem haha :)
0
#about3
{
background-image:url(G:\cpu1.jpg);
background-attachment:fixed;
background-repeat:no-repeat;
margin-bottom:0;
background-position:center;
min-height:400px;
background-size:cover;
}
0
man i don't know how to thank you
0
thanks man you are awesome 😉😃
- 1
background-image:url(the image name.jpg);
- 1
it is really bothering me idk what to do 😥
- 1
i do add it but i won't work
- 1
this is it
- 1
it's for the paralex effect and surprisingly it loads the image that is used for another part (#about1)
- 1
it is really getting annoying now it's been at least 4 hours of talking with different programmers and no answer is found
- 1
guys any idea ?
- 1
ok i tried the code you offered but I'll try it with the picture in the folder too
- 1
oh my god dev you are awesome man oh my god you solved it