I was handed this project from someone who can't finish it. It's an age verification landing page that a user hits before entering a site. It has the normal links to CSS files and script files (as per usual). But they put this line of code in that "works", but causes an issue with the spacing on the page near the top. There's an approximate 10px gap, where this first line shows up if you highlight it.
@-moz-document url-prefix()
{
<link href="_CSS/Firefox.css" rel="stylesheet" type="text/css" />
}
If I take this code out, the page looks horrible in Firefox. I tried this (javascript to determine the browser type and assign a style sheet):
<script type="text/javascript">
var browser = navigator.userAgent;
if (browser == "Firefox") {
document.write("<link type=\"text/css\" rel=\"stylesheet\" href=\"_CSS/Firefox.css\">");
} else if (browser == "Microsoft Internet Explorer") {
document.write("<link type=\"text/css\" rel=\"stylesheet\" href=\"_CSS/IE.css\">");
} else {
document.write("<link type=\"text/css\" rel=\"stylesheet\" href=\"_CSS/AgeVerify.css\">");
}
</script>
But that doesn't seem to work. my questions are as follows:
What is that first bit of code?
Why does it leave an empty space at the top of the page (and show up when you highlight that space)?
Lastly, what can I do to get rid of it and still make firefox display properly?
EDIT : Adding two screen shots:


_CSS/Firefox.cssmight be relevant? Can you create a stand-alone JSFiddle that demonstrates the issue?imgurblocked in your network or something? I can see both screenshots just fine in your post.@-moz-document url-prefix()about anyway? It doesn't look like standardCSS, and I can't find any references to it. Was the code previously used in some other IDE environment that would have pre-processed that? EDIT: I did find a reference: stackoverflow.com/questions/3123063/…