Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

firefox conditional statement

- - - - -

  • Please log in to reply
3 replies to this topic

#1
rgrant1993

rgrant1993

    Newbie

  • Member
  • 12 posts
  • OS:Windows 7 x86
  • Country: Country Flag
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;

I'm not fluent in stupid, So please speak slowly and clearly.





How to remove advertisement from MSFN

#2
Tripredacus

Tripredacus

    K-Mart-ian Legend

  • Super Moderator
  • 9,812 posts
  • OS:Server 2012
  • Country: Country Flag

Donator

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:
MSFN RULES | GimageX HTA for PE 3-5 | lol probloms
msfn2_zpsc37c7153.jpg

#3
allen2

allen2

    Not really Newbie

  • Member
  • PipPipPipPipPipPipPip
  • 1,812 posts
For the record, CSS conditional comment only work for IE: http://www.quirksmod...ss/condcom.html.

#4
tomasz86

tomasz86

    www.windows2000.tk

  • Member
  • PipPipPipPipPipPipPipPip
  • 2,520 posts
  • OS:XP Pro x86
  • Country: Country Flag
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, 30 July 2012 - 01:09 AM.

Posted Image
Unofficial Service Pack 5.2 for MS Windows 2000 <- use this topic if you need help with UURollup, Update Rollup 2 and other unofficial packages




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN