/    Sign up×
Community /Pin to ProfileBookmark

Mime type error when importing another .css into main css for webpage

The first entry in the css for my webpages is:

[code] @import “navbar.css”;[/code]

. It works fine on my local apache2 server but when I try to run it on the webhost I get the following error:

[code]The resource from “http://test.foxclone.com/css/navbar.css” was blocked due to MIME type (“text/html”) mismatch[/code]

The code in the header of the webpage is:

[code]<link href=”css/features.css” rel=”stylesheet” /> [/code]

I’ve never done an import of css before and I’m stumped as to why it works locally but not the webhost. Can someone help me out?

to post a comment
CSS

8 Comments(s)

Copy linkTweet thisAlerts:
@cootheadJul 11.2020 — Hi there act78723,

can you [b]zip[/b] your _"navbar.css"_ file, then upload

it to your server and then provide a link to it?

This would then enable members to examine

it and also probably effect a cure.

Personally, I would suggest that you did not

use @import, but instead just added the

relevant CSS to your _"features.css"_ file, giving

you one less call to the server.

_coothead_
Copy linkTweet thisAlerts:
@act78723authorJul 11.2020 — @coothead#1620459 I'm doing an import because I use the same navbar.css on multiple pages on the site. Much easier to maintain in one file rather than the css file for each page.

Link to gzipped file: [https://drive.google.com/file/d/1aktp_o6X3u2k1lbvsA834OGEFGwR1Q91/view?usp=sharing]
Copy linkTweet thisAlerts:
@act78723authorJul 11.2020 — Just to clarify, I'm getting a vertical menu list instead of a navbar:

Copy linkTweet thisAlerts:
@act78723authorJul 11.2020 — 
Fixed....the problem was that navbar.css was being seen as an html type, not css. Opened it in VS code, saved as css uploaded it to the webhost, no more errors.
Copy linkTweet thisAlerts:
@cootheadJul 11.2020 — Hi there act78723,

well done for finding the error and resolving it yourself. 😃

Making mistakes and correcting them will always improve

your coding skills.

_coothead_
Copy linkTweet thisAlerts:
@ceoreviewJun 14.2021 — CEO Review Magazine

https://ceoreviewmagazine.com/

With an innovative approach towards sheathing businesses, start-up, technology and entrepreneurs, CEO Review Magazine covers business news insights. We know the value of time and by considering this we help you to reach all the latest information that you are deprived of.We research and keep you on top of the latest trend with interesting content all around.

Address : Basement Street, Office A 1, DLF Phase 2, Gurugram, Haryana 122002

Mobile No. : 9599117422

Email-id : [email protected]
Copy linkTweet thisAlerts:
@divyansh_gautamJul 26.2021 — Biotique Morning Nectar Flawless skin moisturizer which easily absorbs and keeps the skin moisture for a longer time. It contains purely natural ingredients like pure honey, wheatgerm and seaweed etc. with The ayurvedic treatment, made Botanical extracts. It helps reduces the skin lines and keeps skin tone. No harmful chemicals occur. Biotique Morning Nectar Flawless skin moisturizer is the best for all skin types and men & women. How to use- apply over the cleansed face and neck, two times in a day. Use alone or with the makeup.

https://shailybeautytips.com/product/biotique-morning-nectar-flawless-skin-moisturizer/
Copy linkTweet thisAlerts:
@SempervivumJul 26.2021 — {"locked":true}
×

Success!

Help @act78723 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.8,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...