External css issue for Internet Explorer

I am working on a website ( www.eticket24.at ) and have to create external CSS for the header and footer.

If I look at the title, for example, separately in FireFox, going to www.eticket24.at/header.php , it looks good - CSS is all there, and it is styled as it should be. However, in IE8, if I do the same, the style will go away completely. It works on the index page, but not when I view it alone.

I use to include CSS at the top of my header.php page. The same goes for my footer.php page. link rel="stylesheet" href="http://www.eticket24.at/et24_header.css

So what is the problem with Internet Explorer this time? Why won't he act?

Thank.

+3
source share
4 answers

This is because when you rotate the title yourself, Firefox will correct the incomplete markup and make the page a valid html document with tags <html><body>...</body></html>.

IE will not do this, so the styles will not be applied because it does not know how to do this on an invalid page.

This is why the page looks right on the site.

+1
source

Your link is inside the body of the page ... try placing it in a section <head />. Also add type="text/css"to the tag <rel />.

+1
source

header.php HTML-, , , Internet Explorer . , Firefox , , , .

, <link> <head>, <body>.

+1

I included all the css inside the .php files themselves, instead of linking them and changing some div names (from to and to. This helped because the css style of divs was overridden by another companys css style, so I had to create my own unique names instead of standard HTML5

0
source

Source: https://habr.com/ru/post/1784746/


All Articles