Search code examples
htmlcssdjangostylesbackground-image

use a web-based image as background with inline style tags, django


im using django2.2 and python3. i only mention that in the event that, somehow, thats apart of why none of this is working.

i have a file, search.html.

literally the only code in the entire file is as follows:

<html>
<body style="background:url("https://www.coolpix.com/image123")>
    some text here
</body>
</html>

the goal here is simply to render the image as the background for the page, yet the only thing that shows up is the text. initially i tried to make this work by using my CSS file, but i couldnt get it to work for some unknown reason. so the next step i took was to just go directly into the html file and make it show up that way. ive tried several different images from several different websites, and nothing seems to work. the only thing showing up is the text. what could i possibly be doing so wrong?


Solution

  • just typo, fix it

    <body style="background:url('https://www.coolpix.com/image123')">