gath
gath

Reputation: 25452

Can i have more then one css file on my html file?

I am using the django framework and am using templates, inheriting a lot of admin base templates. What am wondering is: can I have more than one CSS file in one HTML file? i.e. maintain the django admin CSS file but then have another CSS file of my own with different styles!

Upvotes: 0

Views: 881

Answers (4)

annakata
annakata

Reputation: 75794

Just to add that whilst multiple css files are of course possible, it is actually best practice for you to merge the css (programatically if possible) into as few files as possible.

Fewer files = fewer http requests = better responsiveness for the end user.

Upvotes: 1

Ricardo Acras
Ricardo Acras

Reputation: 36244

Yes you can. Just place the tags to the CSS files or embed the style in style tags.

Upvotes: 8

Karl
Karl

Reputation: 9155

Of course, that's why they are called Cascading Style Sheets, because you can have a dozen of them applied in succession.

Upvotes: -1

Salty
Salty

Reputation: 6688

Yes, you can. But if you try to override any of the CSS in the django admin CSS, you'll have to use !important in your style definitions.

Upvotes: 1

Related Questions