How to link CSS of every file

I’m trying to figure out why my layout changes unexpectedly. In Picture 1(html) , everything displays correctly. But after I add the same code into my Django project, it looks like Picture 2.(in django) shows grid vertically instead

I’m not changing any CSS I’m using the exact same styles for both cases. What could be causing this difference?

in django

.

Welcome @Derrick !

You don’t provide any details, so it’s impossible for us to provide a definitive answer, but the likely possibilities are:

  1. Your browser isn’t loading one (or more) css files from your project
  2. Your project is missing a css file from the original
  3. You’re loading the css files in a different order
  4. You’ve got additional css files being loaded in your project
  5. You’re using a JavaScript / CSS framework that is altering the css.
  6. You’ve added some css having invalid syntax, which is interfering with the browser’s ability to parse and use some directives.

You can start to investigate this by using your browser’s developer tools to see what the css is that is being applied to the page, and look for the differences between the two sites.

You can also check the logs in both cases to ensure all css files are being loaded (you’re not getting any 404s or other reference errors), and the browser’s console to look for error messages that may be displayed.