CSS

Giving in to JavaScript

December 2nd, 2003

After wasting too much time scouring the internet for a way of positioning things accurately in Firebird/Mozilla and IE using only CSS, I've given in and gone for using two separate CSS files, with the following lines of JavaScript to direct the browser to the appropriate file:

var browser;

if (navigator.appName.indexOf('Netscape') != -1) {
    document.write('<'+'link rel="stylesheet"
      href="css/FirebirdCompatible.css" />');
}
else {
    document.write('<'+'link rel="stylesheet"
      href="css/IEcompatible.css" />');
}

OK, so I've given in. But at least now I can get on and finish off the page, which has been languishing, three-quarters-done, for about a week now. ITauthor.com will then, finally, have a proper home page.
Read the rest of this entry »

Potentially similar posts

Leave a comment

 

^ back to top ^

Page 2 of 212