Home>

There is a code:

{% extends 'main /layout.html'%}
{% Block Title%}
News on site
{% endblock%}
{% Block Content%}
    ≪
Div Class= "Features" >
        ≪
H1 >
News on the site <
/h1 >
            {% for el in news%}
                ≪
DIV Class= "Alert Alert-Warning" >
                    ≪
H3 >
{{el.title}} <
/h3 >
                    ≪
P >
{{el.anons}} <
/P >
                ≪
/div >
        {% endfor%}
    ≪
/div >
{% endblock%}

In the classroom, there is a string:

<
Link REL= "STYESHEET" HREF= "{% static 'main /css /main.css'%}" >

in the file main.css. There is a code:

.Alert-Warning {
    Float: Left;
    Clear: Both;
    width: 400px;
    margin: 20px 34%;
    Text-Align: Left;
}

The problem is that ≪ DIV Class= "Alert Alert-Warning" > Fully ignores the code Main.ss

And what to set up Django with static?

Vadim.Sharoikin2021-04-07 17:26:55

@ Vadim.sharoikin, static_url= '/static /' If you are about it //With Django I have been working recently, so I can misunderstand your question

Николай Семенов2021-04-07 18:19:07