Firefox Ignore HTML
#1
Posted 13 August 2006 - 08:03 AM
Is there a way to tell Firefox to ignore a section of code (without Javascript) so that IE will still read it? On my page IE, for once, reads everything fine; but in Firefox my quicktime movie is in the totally wrong position.
I figure that simply telling Firefox to ignore it will be an easier solution to my problem, and it wont use as much of my internet limit each time I view my page.
Thanks a lot.
#2
Posted 13 August 2006 - 08:08 AM
<!--[if IE]> IE only HTML here! <![endif]-->
#3
Posted 15 August 2006 - 07:59 AM
Im sure that works, so I thank you again... Its a pitty that for some reason MySpace filters this code and changes it to:
<!-- -->[if IE]> IE only HTML here! <![endif]-->
Do you know of any work arounds to fool this filter? If not I'll try to find one
Thanks
#4
Posted 09 September 2006 - 06:10 PM
i.e. (Bad choice of acronym there )
<!--[if Mozilla]> Mozilla only HTML here! <![endif]-->
#5
Posted 09 September 2006 - 07:24 PM
<!-- Filename: index.php --> <?php $gecko = 0; if strstr($_SERVER["HTTP_USER_AGENT"], "Gecko") { $gecko = 1; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <link href="style.php" rel="stylesheet" type="text/css" /> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title></title> </head> <body> </body> </html>
// Filename: style.php <?php if ($gecko) { ?> // Gecko rules only. <?php } ?> // The rest of your rules.
I know that HTTP_USER_AGENT can be spoofed, but more often then not it's just Opera pretending to be Internet Explorer isn't it? I do see two things that would have to be taken into consideration though:
1) Unless the Gecko rules are more specific, they will have to be inserted last to take precedence.
2) HTTP_USER_AGENT might be a bit different acrossed other browsers using the Gecko rendering engine, so your if statement might get a bit more complicated.
This should get you moving along
#6
Posted 09 September 2006 - 08:03 PM
Does anyone know of an equivelent tag for Firefox?
i.e. (Bad choice of acronym there )<!--[if Mozilla]> Mozilla only HTML here! <![endif]-->
hmm... the easiest way would probably be to go if not firefox and put the code in there you don't want firefox to see but I can't remember the code for it.
#7
Posted 10 September 2006 - 02:24 AM
Honestly, the only reason i can think of for differentiating between browsers is CSS and JS, simply because you have to.
Edited by rc69, 10 September 2006 - 02:25 AM.
#8
Posted 15 September 2006 - 01:56 PM
@RC69 :
i agree with you...
#9
Posted 30 April 2011 - 10:07 PM
hmm... the easiest way would probably be to go if not firefox and put the code in there you don't want firefox to see but I can't remember the code for it.
What you just said is exactly what I'm looking for right now. If you happen to remember in the future, (or between now and when that post was made) could you send me a message? Thanks.
I already have for if firefox (Admittably I haven't tried it out yet), but I want an if NOT Firefox, so I don't have to create a bunch of styles for all the browsers that aren't IE or Firefox (which I'm not totally sure how to do anyways.)
The reason I need this is because Firefox messes up a code of mine. It shifts it up 3 pixels... the problem with that is that it's not just 3 pixels when it's 3 pixels... it's 3 pixels all the way accross the screen. It matters a lot because the code is for overlapping images.
Edited by Kiddiecat, 30 April 2011 - 10:09 PM.
#10
Posted 01 May 2011 - 02:54 AM
In short, you can't reliably target a specific browser like that.Actually, HTML conditional statements are unique to IE. So to write something that only FF can see, you would have to use JS, PHP, or some other web development language.
If you post your issue in a new topic, it's probably a fairly common issue which somebody could help resolve in a more general way.
#11
Posted 01 May 2011 - 08:10 PM
@-moz-document url-prefix() {#categoryBackNextButtons{
}}
Then it was just a matter of arrangement, but now I'm getting issues with Opera So I'm going to have to check with Safari when I get a chance tomorrow (I'd forgotten that I can check on Opera and Safari at certain times) and then see if I need to find something to target Opera also, or if I just need to use the IE specific code:
<!--[if IE]>
IE only HTML here!
<![endif]-->
(which I haven't actually tried yet) I read somewhere that Firefox had the issue with negative margins, but by the look of it Opera does too. Either that or everyone else is just using a different standard than IE, of which I believe is doing it correct in this instance because I have taken a look at how many pixels are between the text posted on lines, and the reference point IE is using should be the top left of the box this code is being used in. (I wouldn't know for sure because it's a code for a forum; bbcode)
Tomorrow I will know what my new issue is...
Edited by Kiddiecat, 01 May 2011 - 08:13 PM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users