1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

If FireFox/Mozzila

Discussion in 'CSS' started by redhits, Jun 16, 2008.

  1. #1
    I know there is an IF STATMENT for IE

    but can somebody tell me the if statment for Firefox?

    Like for IE :
    <!--[if IE]>
    <link type="text/css" rel="stylesheet" href="iestyles.css">
    <![endif]-->
    SEMrush
    how is for Firefox?
     
    redhits, Jun 16, 2008 IP
    SEMrush
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,487
    Likes Received:
    368
    Best Answers:
    28
    Trophy Points:
    335
    #2
    That's a strictly IE proprietary hack.

    cheers,

    gary
     
    kk5st, Jun 16, 2008 IP
  3. nghia_code

    nghia_code Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    what the same in FF?:cool:
     
    nghia_code, Nov 25, 2009 IP
  4. nghia_code

    nghia_code Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    if (BrowserDetect.browser == 'Firefox' )
    {
    // Load CSS file
    }
     
    nghia_code, Nov 25, 2009 IP
  5. anthonywebs

    anthonywebs Banned

    Messages:
    657
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #5
    
    <!--[if IE]>
    		<link type="text/css" rel="stylesheet" href="iestyles.css">
    		document.getElementById("txt").innerHTML=""
    <![endif]-->
    <span id="txt">
    		<link type="text/css" rel="stylesheet" href="ffstyles.css">
    </span>
    
    Code (markup):
    Tell me how that works for you
     
    anthonywebs, Nov 25, 2009 IP
  6. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    94
    Best Answers:
    7
    Trophy Points:
    0
    #6
    You don't have to hack FF.
     
    drhowarddrfine, Nov 25, 2009 IP
  7. kk5st

    kk5st Prominent Member

    Messages:
    3,487
    Likes Received:
    368
    Best Answers:
    28
    Trophy Points:
    335
    #7
    I'm afraid that wouldn't work all that well. For example, my own version of Firefox has been re-branded as Iceweasel. What about other re-branded and modified versions, e.g. Flock or Epiphany, &c..

    My browser's id string looks like this:
    See PPK's browser detect article and script for the straight poop on the methods and issues of browser detection.

    cheers,

    gary
     
    kk5st, Nov 25, 2009 IP
  8. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,157
    Likes Received:
    1,706
    Best Answers:
    239
    Trophy Points:
    515
    #8
    Quite frankly, you shouldn't need or be using either. If you are needing to send Firefox specific code, it probably means both your HTML and CSS are the WRONG HTML/CSS or the methodology in creating the page is completely broken. But then, I've never once had to resort to IE conditionals for CSS, (I did ONCE for javascript out of expediency) and cannot imagine what you need to do that would warrant it for firefox - since that probably ALSO means the page is broken in Safari and Opera.

    Rather than WASTE YOUR TIME with HTML conditional asshattery, could you post a link to the offending page so we can tell you what you are doing wrong in the first place? Twelve to one you are lacking a doctype, lacking a CSS reset, don't trip haslayout for IE where appropriate, declaring paddings and width at the same time, are using nonsense like 'clearfix', and lack semantic markup with separation of presentation from content.
     
    deathshadow, Nov 28, 2009 IP
  9. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Nah, mebbe OP just had a legend in a form : )
     
    Stomme poes, Dec 4, 2009 IP