Megnut

XHTML and the script tag

So for some odd reason, my alpha Kinja design that was visible in IE, Camino, Firebird, and Safari on IE and Mac suddenly stopped rendering on IE/Mac, IE/Windows, and Safari/Mac (didn't test the others, was too busy freaking out). I tried everything I could think of, validated the code (clean XHMTL 1.0 Strict), validated the CSS, had some friends take a look, and nothing. "View source" showed code, but nothing appeared on screen. Finally, after commenting out code line by line, I nailed it. In my header, I had:

<script src="http://megnut.com/functions.js" type="text/javascript" />

While the validator liked this, and Camino had no problem, the other browers barfed big time and treated it as an unclosed tag, rendering nothing more. A quick change to:

<script src="http://megnut.com/functions.js" type="text/javascript"></script>

and all is right with the world again. I write this because I'm sure I'll have this problem again, and then Google will help me (hi idiot Meg from the future making the same mistakes again!) In the meantime, it may help you.

Previous: Next: