Forums

CSS not implementing from base.html

it seems if cannot find the image with the following script inside the head section of the app1 base.html:

#menu-background-image {
        **background-image: url("{% static 'mine2.jpg' %}");**
        background-position: right 20%;
        background-size: cover;
        height: 100vh;
        width: 100vw;
        left:0px;
        opacity: 0.8;
        position: absolute;
        top: 0px;
        transition: opacity 1000ms ease, background-size 800ms ease, background-position 800ms ease;
        z-index: 0;
        }

The issue is line 3 above the mine2.jpg is correctly located in the static files directory (and the newly created static files from 'collectstatic' command). The following script which appears above the #menu-background-image tag in the same base.html file does get properly implemented.

    #menu-background-pattern{
                height:100vh;
                width:100vw;
                background-image: radial-gradient(grey 5%,transparent 10%);
                <!-- background-color: #fff; -->
                background-position: 150px,0px;
                background-size: 1vmin 1vmin;
                position: absolute;
                left: 0px;
                top: 0px;
                z-index: 1;
                transition: opacity 600ms ease, background-size 600ms ease, background-position 600ms ease;

}

On the desktop both images appear correctly in both chrome and firefox without any adjustments. It alos looks like pythonanywhere has not implemented any of the default css for the default /admin side of the app. I have not made any changes to this side of things and all the database functions are visible but without any css! Anyone had these issues? Many Thanks for any tips/advice.

[edit by admin: formatting]

Have you set up your static file mappings?