0

I currently have a project folder as shown:

PROJECT

  • static
    • base.css
    • login.css
  • templates
    • base.html
    • login.html

I would like login.html to extend base.css (which I have figured out how to do it) but my problem is how to link login.css to this html file without it overriding base.css.

2
  • Why not combine the 2 css files into 1, and use unique id's in your html to refer to specific css? Commented Feb 18, 2019 at 10:51
  • I wanted to include a template that was pre-designed but I've found the solution and I've marked it. Thank you for your response as well. Commented Feb 18, 2019 at 11:15

1 Answer 1

2

If you do not want to override your base.css you can add the login.css in html file first followed by your base.css. This way your base.css will never get override by login.css.

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

1 Comment

Oh wow! I was adding base.css first then login.css. I didn't know alignment also mattered. Thank you very much.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.