CSS does not load in Internet Explorer

So, I do HTML and CSS and do some simple things like changing the background color in CSS. The problem is that when loading a page in Internet Explorer (IE 11), no changes appear. To test this, I loaded my page in Goggle Chrome and displayed the page as expected.

This happened several times, and I tried to make sure that I deleted the cache in Internet Explorer, I made sure that I was editing the file and that the CSS style code was in the same directory. I made sure that I updated Crtl + R / Crtl F5 and it does not work. The strange thing, however, is that after downloading it several times in the past, it works, without me nothing else.

Here is what I am trying to show:

HTML FILE:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Lesson 12 - Fun With CSS Selectors</title>
  <link type="text/css" rel="stylesheet" href="styles.css" media="all">
</head>
<body>

<h1>Title of the page</h1>

<p>Lorem ipsum dolor sit amet ultricies. Nunc at aliquet nunc.</p>

</body>
</html>

CSS FILE:

h1{
    font-size: 30em;
    font-weight: heavy;
    font-color: red;
    line-height: 10px;
}

body{
    background-color: red;
}

h1 (, , , ), Google Chrome, . H1 . - , ?

UPDATE:

, Internet Explorer 11, CSS, ! ... - , , .

+3
4

, IE.

META, pragma expires.

<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="expires" content="-1"/>

- , , ?

question, - :

<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />

, !

+2

Internet Explorer 11, , "", !

, , -, ,

+1

font-color color. <style>body {background-color:#FF0000;} </style>, , .

0

I do not know if everyone traces this problem, but I also ran into them. I am developing a django application. My CSS file called "style.css" loaded correctly (at least the Google Chrome inspector informed me about this), but it didn’t affect my page. It took me a lot of time to figure out, as mentioned by RayLau135, that you should rename the CSS file to a name without "style". Of course, this is not a solution, but really work to cope with this problem and save a lot of time and nerves.

0
source

All Articles