rgrant1993

firefox conditional statement

4 posts in this topic

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;

0

Share this post


Link to post
Share on other sites

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:

0

Share this post


Link to post
Share on other sites

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).

Edited by tomasz86
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.