0

I've a problem with style in my app. I've put my style.css file into static folder but when put the code:

<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}"> 

My main page (body2.html)

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Bootstrap</title> <meta name="viewport" content="width=device-width, initial-scale=1"> HERE IS BOOTSTRAP CDN **<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">** </head> <header> HERE IS MY NAVBAR CODE </header> <style> <link href="{{ url_for('static', filename='style.css') }}" rel="stylesheet" > </style> <body> {% block content %} HERE IS MY PAGE WHICH I EXTEND {% endblock %} </body> </html> 

And page which I'd like to extend

 {% extends "body2.html" %} {% import "bootstrap/wtf.html" as wtf %} {% block content %} HERE IS LOTS OF CODE :) {% endblock %} 

The problem is that I don't see my background

style.css

 body, html { height: 200%; background-repeat: no-repeat; background: -webkit-linear-gradient(90deg, #16222A 10%, #3A6073 90%); /* Chrome 10+, Saf5.1+ */ background: -moz-linear-gradient(90deg, #16222A 10%, #3A6073 90%); /* FF3.6+ */ background: -ms-linear-gradient(90deg, #16222A 10%, #3A6073 90%); /* IE10 */ background: -o-linear-gradient(90deg, #16222A 10%, #3A6073 90%); /* Opera 11.10+ */ background: linear-gradient(90deg, #16222A 10%, #3A6073 90%); /* W3C */ } 
1
  • if it's a CDN shouldn't you be able to use absolute links? O.o Commented Aug 8, 2017 at 14:13

1 Answer 1

1

You are linking an external stylesheet, you should not put that link in a style tag. Also a good practice is to load external files in the head, so the style of the elements is known before loading the page.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.