+ 2

Why attribute background for <body> is not working in sl sandbox?

I found jpg background for my project and wrote image url in attribute, but background didnot change!

24th Jun 2019, 9:08 PM
tageerBOY
tageerBOY - avatar
7 Respostas
+ 3
Please show us your code so that we can help you better. In general, when setting a background image for the body tag use CSS: body { background-image: url("https://yourimage.url"); }
24th Jun 2019, 9:12 PM
Daniel C
Daniel C - avatar
+ 2
You forgot the style tag. <style> body { font-family: 'Mali', cursive; white-space: nowrap; background-image: url("https://i.pinimg.com/originals/a1/7c/fd/a17cfd26e7f4aa2a51e5542a6f7ed46c.jpg"); } </style>
24th Jun 2019, 11:46 PM
Chris Coder
Chris Coder - avatar
+ 1
body { font-family: 'Mali', cursive; white-space: nowrap; background-image: url("https://i.pinimg.com/originals/a1/7c/fd/a17cfd26e7f4aa2a51e5542a6f7ed46c.jpg"); } <body> <div id="registration"> <div class="hello"><p>Hello, Player!<br />your name:</p></div> <center><input type="text" id="nickname" placeholder="nickname" value=""/></center> </div> <center><div id="submit" type="submit"> <a onClick="submit()">Login</a> </div></center> <div class="version"> v-beta; all rights reserved </div> </body>
24th Jun 2019, 10:00 PM
tageerBOY
tageerBOY - avatar
+ 1
But background still not change in sandbox
24th Jun 2019, 10:05 PM
tageerBOY
tageerBOY - avatar
+ 1
I had style tag before, I just copied a part of the css code for <body>.
25th Jun 2019, 6:37 AM
tageerBOY
tageerBOY - avatar
+ 1
I wrote the code on the php sandbox, but in the web sandbox the background changes
25th Jun 2019, 6:39 AM
tageerBOY
tageerBOY - avatar
0
haha, make sure you write your code in the correct sandbox :D
25th Jun 2019, 4:51 PM
Chris Coder
Chris Coder - avatar