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:
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
- How to: Get a white screen – June 2011
- It’s got to be fun – May 2011
- Viewing dynamically generated HTML in the HTML Help viewer – November 2010
- Does online help need an overall structure? – June 2010
- Recent posts – March 2009