Forum Moderators: not2easy

Message Too Old, No Replies

Problem with commented out style sheet in FireFox

         

AZeitler

8:34 pm on Sep 27, 2004 (gmt 0)

10+ Year Member



hi,

recently i got a tip on using 2 stylesheets in a file in order to override the settings made in file A with settings in file B. This should allow me to make different settings for FireFox and IE.
The problem/tip is shown here:
[webmasterworld.com...]
The tip was working well.

Now i made a new site and again i tried to reuse the tip. But now, the settings made in file A are overridden by the settings in file B also in FireFox.

The page without modifying the #ContentHeader-ID in the EventManager-IE.css file works fine in FireFox.

But when overriding the margin-left in the EventManager-IE.css the result in FireFox is that there is a space right to the image with the people on it (in FireFox) which leads to repeating background in the 1px space.

<No personal URLs, thanks. See TOS [WebmasterWorld.com] and CSS Forum Charter [WebmasterWorld.com]>

What may I do wrong?

regards,

Alex

[edited by: DrDoc at 12:13 am (utc) on Sep. 28, 2004]

SuzyUK

9:41 am on Sep 28, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



HI Alex..

I think what that tip was saying was to use IE Conditional Comments [msdn.microsoft.com]..

You need those comment tags in place in order to hide the second sheet from everything but IE. Also theses comments can be used to target differing versions of IE and the syntax should depend on which IE you want to target.

e.g.

<!--[if lte IE 5]>
code in here will only be seen by IE/Win 5 and below
<![endif]-->

<!--[if IE]>
code in here only read by IE/Win - all versions
<![endif]-->

Suzy

AZeitler

9:59 am on Sep 28, 2004 (gmt 0)

10+ Year Member



hi Suzy,

your proposal is the solution - thank you.

regards,

Alex

DrDoc

4:20 pm on Sep 28, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<!--[if lte IE 5]>
code in here will only be seen by IE/Win 5 and below
<![endif]-->

<!--[if IE]>
code in here only read by IE/Win - all versions
<![endif]-->

Just to clearify...
The first one will show up in both IE 5.0 and 5.5. Neither one will show up in anything below IE 5.0 (since that's when Conditional Comments were introduced). For more information, follow the link Suzy provided :)