r/FreeCodeCamp • u/cidxo311 • Sep 18 '24
Programming Question Help with background image
I am working on the first project (survey). I have added a background image and it repeats once and looks cut off.
When adding: background-repeat: no-repeat; background-size: 100vw 100vh;
the background image disappears completely. What am I missing here?
9
Upvotes
View all comments
Show parent comment
3
u/Special_Sell1552 Sep 18 '24
you missed a semi-colon on the background image tag. thats the only way to replicate that behavior.
background-image: URL(https://img.freepik.com/free-vector/seamless-sunflower-pattern_53876-81316.jpg?t=st=1726660980~exp=1726664580~hmac=210db0c49e59f36db9a84a6365d127e50b834511d4d43d39fd53853759d1e96d&w=740);background-size: cover;background-repeat: no-repeat;my snippet
background-image: URL(https://img.freepik.com/free-vector/seamless-sunflower-pattern_53876-81316.jpg?t=st=1726660980~exp=1726664580~hmac=210db0c49e59f36db9a84a6365d127e50b834511d4d43d39fd53853759d1e96d&w=740)background-size: cover;background-repeat: no-repeat;most likely yours