Firefox ignores IE-Hack??

This is a discussion on "Firefox ignores IE-Hack??" within the Web Page Design section. This forum, and the thread "Firefox ignores IE-Hack?? are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Nov 10th, 2007, 21:14
New Member
Join Date: Nov 2007
Location: Na maika ti
Age: 22
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Firefox ignores IE-Hack??

Hallo guys,

I have a terrible IE problem that I`m trying to fix since weeks! It`s the dropdown thing.
Well, I`ve just managed to get my submenu in IE visible and in Firfox everything went completely chaotic! I have done everything as it is explained and still, it wont work like it should. I hate it!

So, why is all this.
In the html I have used the IE detect hack:
HTML: Select all
<!--[if lt IE 6]>
<style type="text/css">
body{ behavior: url(fileadmin/tamplates/scripts/csshover.htc); }
</style>
<@import url(styles/ie6.css); />
<![endif]--> 
and I thought it should be seen only from IE. Apparently not.
In the ie6.css I have only told IE, it should load gifs instead of pngs, and gave the submenu-link a 100% width, in order to IE actually show it :
Code: Select all
#mainmenu ul ul li{
background-image:url(../images/menu/tv_button_links_tr.gif);
width:100%;
}
I tried it in IE and ... a miracle, it worked ... But in Firefox all went completly wrong - the submenu-links had 100% width and were gifs! It has read the ie6.css instructions and overwritten these in the default.css

Why is that? How can I keep both css-styles separated(Firefox should load png and IE gif, width, etc.)? I`ve used the standart IE-detecting hack

I thank you in advance!

Last edited by karinne; Nov 13th, 2007 at 13:24. Reason: Please use vBcode when adding code in your post.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Nov 10th, 2007, 21:27
Most Reputable Member
Join Date: May 2007
Location: UK
Age: 27
Posts: 1,111
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Firefox ignores IE-Hack??

Please post a link so we can see your actual code.

For a start, I don't know why you bother fixing IE5. Hardly anyone uses it; it's a dead browser.

And why the odd mixture of <style> and <@import>? What's wrong with a simple <link>ed styelsheet?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Nov 10th, 2007, 21:39
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Firefox ignores IE-Hack??

Mike, don't you mean IE6? myforum did not say anything about IE5, but gathering from his/her <!--[if lt IE 6]> declaration, I'd say s/he means IE6. That declaration, by the way, myforum, is wrong. It's <!--[if IE 6]>. The "It" should not be there...
As for the linked stylesheet Mike was talking about, this is what he means:
HTML: Select all
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" media="all" href="styles/ie6.css">
<![endif]--> 
As far as I'm concerned, <@import /> doesn't exist. The import function only works inside css. Like this:
HTML: Select all
<style type="text/css">
@import "styles/ie6.css";
</style>
But use the linked stylesheet I posted above instead.

Cheers
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Nov 11th, 2007, 08:51
New Member
Join Date: Nov 2007
Location: Na maika ti
Age: 22
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Firefox ignores IE-Hack??

hi guys,

I actually didn`t use the @import command but the <link href...>, I`ve just tried if it makes difference.

Swanger, I`ve tried it like u suggested... it still goes wrong
HTML: Select all
<link rel="shortcut icon" href="http://www.webforumz.com/images/icon/favicon.ico" type="image/ico" />
<link href="styles/default.css" rel="stylesheet" type="text/css" />

<!--[if IE 6]>
<link rel="stylesheet" type="text/css" media="all" ref="styles/ie6.css">
<![endif]--> 

</head> 
I just can`t understand where this comes from ! its confusing...

Last edited by karinne; Nov 13th, 2007 at 13:24. Reason: Please use vBcode when adding code in your post.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Nov 11th, 2007, 09:48
Reputable Member
Join Date: Jun 2007
Location: uk
Posts: 459
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Firefox ignores IE-Hack??

I am no expert on this but try:

HTML: Select all
<!--[if IE 6]><link rel="stylesheet" type="text/css" media="all"  href="ie6.css"/><![endif]-->
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Nov 11th, 2007, 10:03
Marc's Avatar
Staff Manager

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Posts: 1,794
Thanks: 0
Thanked 17 Times in 17 Posts
Re: Firefox ignores IE-Hack??

Try:
HTML: Select all
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" media="screen" href="styles/ie6.css" />
<![endif]-->
That is suggesting that your stylesheet is in the styles directory. Also, what versions of IE do you want it to show in?
__________________
Marc
Staff Manager - Webforumz.com


Want to be a moderator? PM me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Nov 11th, 2007, 10:15
Most Reputable Member
Join Date: May 2007
Location: UK
Age: 27
Posts: 1,111
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Firefox ignores IE-Hack??

Quote:
Originally Posted by swagner View Post
Mike, don't you mean IE6? myforum did not say anything about IE5
No, I didn't mean IE6. I was looking at his code, which said IE5!

Post a link. Otherwise it's difficult to help you.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Nov 11th, 2007, 10:20
Marc's Avatar
Staff Manager

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Posts: 1,794
Thanks: 0
Thanked 17 Times in 17 Posts
Re: Firefox ignores IE-Hack??

Also Swagner, "lt" means Less Than so "lt IE 6" means IE5 and below....
__________________
Marc
Staff Manager - Webforumz.com


Want to be a moderator? PM me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old Nov 11th, 2007, 17:26
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Firefox ignores IE-Hack??

Oh, ok. The only reason it could be going wrong then is that you are using ref instead of href.
By the way, since the title of this thread is "Firefox ignores IE-Hack" I'm guessing that you want Firefox to read the stylesheet, no?. Firefox is supposed to ignore it, is specified for only IE. If you want the styles to apply to Firefox as well, get rid of the <!--[if IE 6]> and the linked stylesheet will be read by all browsers.
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
A Nofollow Hack Corey Bryant Webforumz Cafe 3 Oct 28th, 2007 12:41
HELP!! The underscore hack charlie019 Web Page Design 3 Aug 6th, 2007 19:42
Box Model Hack? jwalker80 Web Page Design 4 Feb 2nd, 2007 02:10
need an IE hack please moisea Web Page Design 2 Oct 19th, 2006 22:32
100% Height [ non CSS hack] Roy2001 Web Page Design 3 Aug 7th, 2006 14:00


All times are GMT. The time now is 15:07.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42