title: Django extend template
body: <p>I still very new to Django.</p>
  
  <p>I have 4 .html files: header.html(generic header for every page), body.html(load necessary css file and generate navigation button according to user roles), home.html and apply.html</p>
  
  <p>Here is what I want to do:
  1)header.html(generic title for every page) parent of body.html.
  2)body.html parent of home.html and apply.html</p>
  
  <p>here is my code in header.html:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  {% load staticfiles %}
  &lt;head&gt;
      &lt;link rel="shortcut icon" href="{% static "favicon.ico" %}"/&gt;
      &lt;link rel="stylesheet" href="{% static 'loginTemplate.css' %}" /&gt;
  {% block body %}{% endblock %}
  {% block content %}{% endblock %}
  </code></pre>
  
  <p>Here is my code in body.html:</p>
  
  <pre><code>{% extends "header.html" %}
  {% block body %}
  {% for role in roles %}
  {% load staticfiles %}
  &lt;link rel="stylesheet" href="{% static 'bodyTemplate.css' %}"/&gt;
  &lt;/head&gt;
  &lt;body&gt;
   &lt;div&gt;&lt;!--place my button here&lt;/div&gt;
  {% endfor %}
  {% endblock %}
  </code></pre>
  
  <p>Here is my code in home.html and apply.html:</p>
  
  <pre><code>{% extends "body.html" %}
  {% block content %}
  &lt;div&gt;load user detail&lt;div&gt;
  {% endblock %}
  </code></pre>
  
  <p>Question: When i login to my test user, home.html showed the interface design that I want because bodyTemplate.css is included. But when I press a button that will link to apply.html, it showed me a white page with empty styling words and no button.</p>