Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9253555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:14:56+00:00 2026-06-18T11:14:56+00:00

I have two django template pages, one of them is base.html, with basic html

  • 0

I have two django template pages, one of them is “base.html”, with basic html tags setup as a base template. Now I have a page “child.html” that extends it, with something like {% extends "base.html" %} in it. Now I have to change <body> background color for this particular page, so in the css of “child.html” I wrote:

body {
    background-color: #000000;
    /* some other css here */
}

But the body doesn’t seem to respond to any changes. I think I must have missed something. Please help, thanks.

Edit:
In “child.html”, I simply have

<link rel="stylesheet" type="text/css" href="/site-media/css/template_conf.css"/>

and I try to change body css in template_conf.css, and there’s no other page that includes template_conf.css.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T11:14:57+00:00Added an answer on June 18, 2026 at 11:14 am

    In the main template:

    <body class="{% block body_class %}{% endblock %}">
    ...
    </body>
    

    Then in the child template, just define the block:

    {% block body_class %} my_new_body_css_class {% endblock %}
    

    This will render a <body class="my_new_body_css_class">...</body> and you have to define this class in a linked CSS.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two servers - one Django, the other likely to be written in
I have two models, one a vanilla Django model, another an unmanaged model wrapping
I have a Django project that, on one page, has multiple forms (in different
I have a Django project which has two apps (one created as debug test).
In a django template, is it possible to have two (or more) dots after
I have a list of two dictionaries I am passing to a Django template:
Django beginner. I have a base template with a logo, and three subsections for
I have two tables of data in a Django app, one containing shipping vessel
Is is possible to programatically join two tables using Django's ORM? I have two
I have two models in my Django application, for the purposes of storing search

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.