1

I made my webpage using Chrome and forgot to look at how my webpage loads in IE. When I open it in IE it looks like the browser isn't even using the css. Below is the code I placed in the <head> of my html files:

<!DOCKTYPE HTML>

 <html>

 <head>

 <title></title>

 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <link rel=StyleSheet href="largecw.css" TYPE="text/css" media=screen/>
 <script src="largecw.js" type="text/javascript"></script>
Jeroen
  • 60,696
  • 40
  • 206
  • 339
James Forbes
  • 199
  • 1
  • 2
  • 14

5 Answers5

5

Issues 1

<!DOCKTYPE HTML>

it should be DOCTYPE

Issue 2

 <link rel=StyleSheet href="largecw.css" TYPE="text/css" media=screen/>

in this line media=screen is connected with / (media=screen/) and so it is not able to recognize media so better put it under quotes

 <link rel=StyleSheet href="largecw.css" TYPE="text/css" media="screen"/>
Naveen Sharma
  • 586
  • 2
  • 10
2

In your <link> you use unquoted attributes and in combination with the closing /> the attribute value of media is set to screen/. This is an invalid media query so the CSS file is not loaded. Always quoting attributes prevents such mistakes, see also https://stackoverflow.com/a/6495345/723769

To fix the issue quote all your attributes or add an additional space before the /> (or omit the / entirely since it is not required in HTML5).

Further you have a faulty doctype, which causes Quirksmode rendering in IE. It should be <!doctype html>.

Community
  • 1
  • 1
Jona
  • 2,087
  • 15
  • 24
1

Try this code instead:

<!DOCTYPE HTML>

 <html>

 <head>

 <title></title>

 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <link rel="stylesheet" href="./largecw.css" type="text/css" media="screen" />
 <script src="./largecw.js" type="text/javascript"></script>

Hope that helps.

Michael Giovanni Pumo
  • 14,338
  • 18
  • 91
  • 140
0

You need " " wrapped around your rel="StyleSheet" and media="screen"

Chrome is not as strict as IE when it comes to loading head

Michael Tot Korsgaard
  • 3,892
  • 11
  • 53
  • 89
0

check specified css file's path, there might be chance that,resoucre not found at specified path.(if you have some separate folder to keep the css file,try to add its parent directory)

e.g. 
  <link rel="stylesheet" href="css/largecw.css" type="text/css" media="screen"/>

Check the path, once again.

user1746468
  • 75
  • 2
  • 11