Created
July 14, 2017 06:40
-
-
Save davidgarsan/b31f060916e4fe73690fdd591b1857c2 to your computer and use it in GitHub Desktop.
Fix for IE8 and IE9 base tag bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
<base href="/"> | |
<!--[if IE]><script type="text/javascript"> | |
// Fix for IE ignoring relative base tags. | |
// See http://stackoverflow.com/questions/3926197/html-base-tag-and-local-folder-path-with-internet-explorer | |
(function() { | |
var baseTag = document.getElementsByTagName('base')[0]; | |
baseTag.href = baseTag.href; | |
})(); | |
</script><![endif]--> | |
<!-- this relative css path include should now work --> | |
<link type="text/css" rel="stylesheet" href="css/site.css" media="screen, projection"> | |
<!-- include your other css and javascript files here.. --> | |
</head> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment