Css | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Css

Using css instead of putting colour can put a pic on the background of whole body, if possible how to do it?

2nd Jul 2018, 5:43 PM
Shyamal Bhatt
Shyamal Bhatt - avatar
9 Answers
+ 13
body{ background-image: url("http..."); }
2nd Jul 2018, 5:46 PM
bobbie
bobbie - avatar
+ 10
Just play around with the size properties untill you get what you want here is some info on how https://www.w3schools.com/cssref/css3_pr_background-size.asp
2nd Jul 2018, 6:01 PM
bobbie
bobbie - avatar
+ 9
body { background-image : url("https://image.jpg"); }
2nd Jul 2018, 5:48 PM
***
+ 8
Meghana S Thank you!!!🙂 I will be happy to help you any way I can. If you have any questions about any of it just leave me a comment on it I will try to answer. We are not supposed to spam these threads with off topic chat but codes are fair game.🙂
3rd Jul 2018, 5:04 AM
bobbie
bobbie - avatar
+ 6
Thanks Calviղ I tested and both methods appear to work fine. You have helped with my codes you are well aware I don't worry with proper just results lol.🙃
3rd Jul 2018, 3:53 AM
bobbie
bobbie - avatar
+ 3
body{ background-image: url("link"); background-size:100% 100%; }
2nd Jul 2018, 6:09 PM
᠌᠌Brains[Abidemi]
᠌᠌Brains[Abidemi] - avatar
+ 2
Please note that the correct way to set url on background image css is background-image: url(http://....jpg); It's without double quotes between the url link.
3rd Jul 2018, 3:35 AM
Calviղ
Calviղ - avatar
+ 2
hey I just saw your hacker terminal challenge bobbie and ... omg I loved it. Can you teach me how to do it ?? I am amazed
3rd Jul 2018, 5:00 AM
Meghana S
Meghana S - avatar
0
Since the web page is on monitor, I need to be adjust to px of that image?
2nd Jul 2018, 5:50 PM
Shyamal Bhatt
Shyamal Bhatt - avatar