Reputation: 915
I have a case that I want the css to be in the body not in the header, because the header is for all pages and each page have a different css file.
I have a problem that the style is working on chrome and firefox but it is not working on IE11.
I tried to use F12 to debug the problem and I discovered the problem.
when I click on the div class=waitingTime" on IE 11, the style is not appeear on the right view.
but when I do the same thing on chrome and firefox, the style is appears on right.
you can see that the code of adding the css file is above the div
For people who can't see the images, I upload them here http://postimg.org/image/dd2p19gkh/
http://postimg.org/image/c5a0dntvn/
this is how I add the css
<link href="http://localhost:8082/ParkingProject/public/css/waitingTimes" rel="stylesheet" type="text/css" media="all">
<div class="waitingTime">
</div>
Upvotes: 0
Views: 141
Reputation: 915
Finally I found the problem
The file is waitingTime.css but I forgot to say .css
chrome and firefox so clever to udnerstand it but IE is stupid :) so when I added .css
it works
Upvotes: 0
Reputation: 116100
You can use link
tags in the body (only in HTML5) documents, but only when they have an itemprop
attribute, not when they have a rel
attribute.
So, your HTML is invalid. It's very nice of Chrome that it accidentally processes your page correctly, but you cannot blame IE for not doing so.
See also
Can I use <link>
tags in the body of an HTML document?
Upvotes: 1