Hi, Still the same problem :(
Mikko 2018-05-26 17:30 GMT+03:00 Dylan Reinhold <[email protected]>: > Mikko, > Your css file is polls/static/polls/images/style.css but you are trying > to link to polls/style.css which would be [ olls/static/polls/style.css ] > > Move your style.css file one folder folder down into > polls/static/polls/style.css > > Dylan > > On Sat, May 26, 2018 at 6:52 AM, Mikko Meronen < > [email protected]> wrote: > >> Hi, >> >> I can't get the CSS code to work. Link color doesn't change to green nor >> the background image appear. >> >> What could be the problem? The CSS code is in Wordpad. >> >> >> polls/static/polls/images/style.css: >> >> li a { >> color: green; >> } >> >> body { >> background: white url("images/background.gif") no-repeat; >> } >> >> >> >> >> polls/templates/polls/index.html: >> >> {% if latest_question_list %} >> <ul> >> {% for question in latest_question_list %} >> <li><a href="{% url 'polls:detail' question.id %}">{{ >> question.question_text }}</a></li> >> {% endfor %} >> </ul> >> {% else %} >> <p>No polls are available.</p> >> {% endif %} >> >> {% load static %} >> >> <link rel="stylesheet" type="text/css" href="{% static 'polls/style.css' >> %}" /> >> >> >> >> Best regards, >> >> Mikko >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at https://groups.google.com/group/django-users. >> To view this discussion on the web visit https://groups.google.com/d/ms >> gid/django-users/CAGD0jjK-CUUcUe9oTNqCLt%2BGTVkro2eGc12Xcjiq >> sMj7xdZcBQ%40mail.gmail.com >> <https://groups.google.com/d/msgid/django-users/CAGD0jjK-CUUcUe9oTNqCLt%2BGTVkro2eGc12XcjiqsMj7xdZcBQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/django-users/CAHtg44D%2B-C8FyXbZGQ2704q0gtbZPk9sgeVt-M_ > uQA1bgxbrXQ%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAHtg44D%2B-C8FyXbZGQ2704q0gtbZPk9sgeVt-M_uQA1bgxbrXQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAGD0jjLev_msRb5XKmqFdH-X9Q-C5%2BO2CjBbaFN0ZHzFS1wgyw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

