MSFN Forum: firefox conditional statement - MSFN Forum

Jump to content


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

firefox conditional statement what is the code? Rate Topic: -----

#1 User is offline   rgrant1993 

  • Newbie
  • Group: Members
  • Posts: 12
  • Joined: 20-August 11
  • OS:Windows 7 x86
  • Country: Country Flag

Posted 12 November 2011 - 05:20 PM

for internet explorer we have
<--[if ie]>

<![endif]-->


what is the mozilla firefox code? i researched this and came up with
<--[if Gecko]>

<![endif]-->

But it is not working.
i am linking the cascading style sheets to my html page.
like this-
index.html
<html>
<head>
<title>Moz</title>
<!--[if Gecko]>
<link href="CSS/index.css" rel="stylesheet" type="text/css">
<![endif]-->
</head>
<body>
<hgroup>
<h1>text 1</h1>
<h2>text 2</h2>
</hgroup>
</body>
</html>


index.css
@charset "utf-8";
/* CSS Document */


body{/* background image and settings */
background-image:url('../images/background.png');
background-repeat:repeat-y;
background-size:1345px;
}
hgroup {/* text center */
text-align:center;




#2 User is offline   Tripredacus 

  • K-Mart-ian Legend
  • Group: Super Moderator
  • Posts: 8,665
  • Joined: 28-April 06
  • OS:Server 2012
  • Country: Country Flag

Posted 17 November 2011 - 05:33 PM

Why not code your site for Firefox and add exceptions for other browsers you intend to support? This would be easier than making exceptions for everything... :whistle:

#3 User is offline   allen2 

  • Not really Newbie
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,731
  • Joined: 13-January 06

Posted 30 July 2012 - 12:33 AM

For the record, CSS conditional comment only work for IE: http://www.quirksmod...ss/condcom.html.

#4 User is offline   tomasz86 

  • http://www.windows2000.tk
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,220
  • Joined: 27-November 10
  • OS:Windows 2000 Professional
  • Country: Country Flag

Posted 30 July 2012 - 01:08 AM

But there are CSS hacks for other browsers, ex. for Opera:
noindex:-o-prefocus, body {
    font-size: 81.3%}

I use this on my website because Opera scales % differently than other browsers (in this case it's set to 87.5% for the rest).

This post has been edited by tomasz86: 30 July 2012 - 01:09 AM


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy