After migrating the Django website to a new instance, the CSS ceased to function properly

I recently made the switch from hosting my website on Redhat to Amazon Linux on EC2 due to the cost savings. After configuring the Apache server and Django settings, the website seemed to be functioning properly except for the layout of the HTML. The CSS was not being applied at all. Interestingly, when comparing the source file of the HTML on the server to that on my laptop, they appeared to be identical.

The link to the CSS file in the HTML source was correct as clicking on it led to the CSS file. However, the background picture was not showing up and the sidebar was appearing below the content, almost as if the CSS wasn't being applied at all.

Has anyone else experienced this unusual issue before?

Answer №1

Google Chrome DevTools has detected an issue:

Resource appears as Stylesheet but sent with MIME type text/plain.

Here are the Response Headers for your css file:

Accept-Ranges: bytes
Connection: close
Content-Length: 1892
Content-Type: text/plain; charset=UTF-8
Date: Fri, 05 Jun 2015 06:39:54 GMT
ETag: "40945-764-517bea2cb7b4f"
Last-Modified: Fri, 05 Jun 2015 05:33:46 GMT
Server: Apache/2.2.29 (Amazon)

To resolve this issue, you should configure the Amazon web server and ensure the correct content type is set for the styles.

For help with configuring Apache server, you can visit this link:

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Implementing custom styles in JavaScript according to the specific browser or platform

When it comes to adding multiple css styles to a dom element and ensuring compatibility across different browsers, which approach is more optimal for performance? Combining all prefixed css properties together, allowing the browser to decide which one ...

Turn off automatic compilation for LESS styling

In my Eclipse environment, I am looking to have LESS compile only when explicitly triggered by mvn package. Currently, any changes made in my less file immediately update the CSS. How can I prevent this automatic behavior? <plugin> <groupId> ...

Contact form script malfunctioning, showing a blank white page

Encountering a white screen when trying to submit my contact form with fields for Name, Email, Subject, and Message. I am looking to receive emails through my website. I have double-checked all variable names and everything seems to be correct. Since I am ...

The banner <div> appears in Chrome but is not visible in IE9

I'm facing an issue with a banner div under my navigation. It seems to show up in Google Chrome but doesn't appear in IE9. Below is the HTML and CSS code: HTML: <div class="content"> <div class="slide-banner"></div> ...

Shrink Table Column Size with Bootstrap and Stylus to Optimize Space Usage

Currently experimenting with Bootstrap to ensure my table is responsive on a search list I am developing. However, I am facing an issue where two of my columns are taking up more space than necessary. In the image below, you can see that Date and Link colu ...

What's the best way to ensure a div's height and width are equal when implementing responsive design?

I am currently working on a responsive design and facing challenges in making div's height and width equal. Initially, I set the div's width as a percentage and height as auto, but this caused the divs to not display properly. To resolve this iss ...

Manipulating Objects with CSS Transform in Global/Local Coordinates

If we take a closer look at our setup: <div id="outside"> <div id="inside">Foo</div> </div> and apply a rotation to the outer element - let's say turning it 45 degrees clockwise: <div id="outside" style="transform: ro ...

Daily Django Annotations for Specific Time Frames

Currently, I am using the query below to calculate a daily sum: orders = OrderM.objects.filter(user=request.user) \ .annotate(day=TruncDay('datetime_added')) \ .values('day') \ ...

CSS navigation menu with drop-down functionality

I am currently learning CSS and HTML as I work on the CCTCcart project. When running the code in the bottom menu section, I noticed that when clicking on any menu item such as Products, the white background color merges with blue. I need to find a solution ...

Apply a 2 pixel top border to an HTML table

Is there a way to add a double border at the headcell without using background images? Currently, I have a white color border top and want to add a grey color border on top of the white one. Is it possible to achieve something like #ccc and #fff for borde ...

Gathering notifications from external applications using Django

Is there a way to generate messages (manage.py makemessages) from a 3rd party library located in the virtualenv directory? I attempted adding the messages directly to the .po file, but whenever I execute the makemessages command, my translation disappears ...

The functionality of jQuery smooth scrolling to an anchor is only effective when the page is at the top and there is

Currently, I am working on designing a simple one-page website featuring a fixed menu that smoothly scrolls to specific sections on the page upon clicking the menu items. However, I have encountered an issue where the scrolling works perfectly only when t ...

Tips for achieving fluid and seamless page scrolling on a website

Looking to add smooth scrolling to my website but unsure of the best method - whether to override normal mouse scrolling or pursue another approach. I'm aiming for a similar effect as seen here. Give it a try and scroll through the page. ...

I'm looking to keep the footer anchored at the bottom without using the absolute positioning

I am currently developing a website and have implemented a wrapper for the footer. My goal is to create a sticky footer, but when I minimize the screen, the footer ends up overlapping with the content and header. #footerWrapper { height: 177px; bottom: ...

The hover effect flickers in Firefox, but remains stable in Google Chrome

Here is an example link to check out: I am facing a dilemma on how to solve this issue and unsure if it is related to jQuery or the DOM structure. If you have any suggestions, they would be greatly appreciated. Thank you! ...

CSS3 Perspective Issue: Solutions for Fixing

I'm currently working on creating a card flip animation that flips in the X axis direction. Right now, the div rotates using the rotateX() method. I attempted to add the perspective property to the upper div, but it ended up distorting my div structur ...

none of the statements within the JavaScript function are being executed

Here is the code for a function called EVOLVE1: function EVOLVE1() { if(ATP >= evolveCost) { display('Your cell now has the ability to divide.'); display('Each new cell provides more ATP per respiration.'); ATP = ATP ...

Error message on Google App Engine with Django: "Instance names are not allowed to have the ':' symbol."

Currently, I am following a tutorial on how to run a Django project on Google AppEngine. The specific tutorial I am using can be found here. At this point, I have reached the section where I need to create a Cloud SQL instance. As per the instructions: Now ...

Tips for launching server in debug mode with Pycharm

Having trouble debugging my code and setting breakpoints, as I am unable to start my server in debug mode. In my setup.sh file, there are multiple export statements with the last statement being 'python manage.py runserver'. I also added DEBUG = ...

What is the best way to retrieve multiple rows from a Django database?

Hello, I am currently in the process of developing an employee attendance program and my goal is to enable employees to view the total hours they have worked. Below is the section of code that seems to be causing some issues: elif 'checkName' in ...