Support » Fixing WordPress » Different CSS for different browsers

  • I have a problem with the footer of my blog in Internet explorer, where it has been pushed over to the right of the screen. I can’t seem to fix it in the css and was instead wondering if there was some way to use a php conditional or something to call up a different css stylesheet depending on the browser. EG, a simple one for IE and the usual more complicated one for other browsers. If anyone knows a way of doing this, I would be really grateful! Thanks! Also If anyone knows an IE hack for positioning a browser then I would also be really grateful! Thanks again!

Viewing 1 replies (of 1 total)
  • <script language=”JavaScript”><!–
    browser_version= parseInt(navigator.appVersion);
    browser_type = navigator.appName;

    if (browser_type == “Microsoft Internet Explorer” && (browser_version >= 4)) {
    document.write(“<link REL=’stylesheet’ HREF=’YOURIESHEETHERE’ TYPE=’text/css’>”);

    else {
    document.write(“<link REL=’stylesheet’ HREF=’YOURDEFAULTSHEETHERE’ TYPE=’text/css’>”);
    // –></script>

    Note that your header is usually like this:

    <link rel=”stylesheet” href=”<?php bloginfo(‘stylesheet_url’); ?>” type=”text/css” media=”screen” />

    ITS UGLY, but hey!,

Viewing 1 replies (of 1 total)
  • The topic ‘Different CSS for different browsers’ is closed to new replies.