locked
Cross browser css? RRS feed

  • Question

  • Hi all

    I am writing a css - file which I want to work on both IE and FireFox. Is there something I can write in my css - file to detect the browser, and then automaticly make the same class work differently according to which browser the users are using?


    Anyone here that has had a problem regarding drop down menu that starts to flicker when you show a .pdf - document inside a page layout, and the drop down menu hits it? Found any solutions?


    Regards
    Monday, October 20, 2008 9:12 AM

Answers

  • Ok .. first off .. this is NOT a SharePont development question .. this should be in the general web development forum.

    Regarding your question, you can use the "html > body" argument in your CSS to make some CSS work differently for Internet Explorer and FireFox.

    See this article for more details:
    http://www.webcredible.co.uk/user-friendly-resources/css/hacks-browser-detection.shtml


    You also might want to consider that FireFox is not a recommended browser for SharePoint 2007. Ok, technically it does "sort of" work, but Microsoft states that the recommended browser is Internet Explorer, as some features simply won't work in FireFox.
    See this article for more information:
    http://technet.microsoft.com/en-us/library/cc262506.aspx


    regards
    Martin Hatch
    MCPD .Net Web Development
    MCTS WSS 3.0 | MOSS 2007
    Visit my Blog
    Monday, October 20, 2008 9:46 AM
  • Just stick to the standards and you will notice that there will be really few adjustments you will have to do to make it look all right in IE. Keep in mind that you should start creating the CSS in a non-IE browser (Firefox/Safari/Opera) as these have better (according to the standards) implementation of CSS and then have a look at how it all looks like in IE.
    -- http://blog.mastykarz.nl
    Monday, October 20, 2008 4:01 PM

All replies

  • Ok .. first off .. this is NOT a SharePont development question .. this should be in the general web development forum.

    Regarding your question, you can use the "html > body" argument in your CSS to make some CSS work differently for Internet Explorer and FireFox.

    See this article for more details:
    http://www.webcredible.co.uk/user-friendly-resources/css/hacks-browser-detection.shtml


    You also might want to consider that FireFox is not a recommended browser for SharePoint 2007. Ok, technically it does "sort of" work, but Microsoft states that the recommended browser is Internet Explorer, as some features simply won't work in FireFox.
    See this article for more information:
    http://technet.microsoft.com/en-us/library/cc262506.aspx


    regards
    Martin Hatch
    MCPD .Net Web Development
    MCTS WSS 3.0 | MOSS 2007
    Visit my Blog
    Monday, October 20, 2008 9:46 AM
  • Just stick to the standards and you will notice that there will be really few adjustments you will have to do to make it look all right in IE. Keep in mind that you should start creating the CSS in a non-IE browser (Firefox/Safari/Opera) as these have better (according to the standards) implementation of CSS and then have a look at how it all looks like in IE.
    -- http://blog.mastykarz.nl
    Monday, October 20, 2008 4:01 PM