Forum Moderators: not2easy

Message Too Old, No Replies

Help Needed with IE6 Tweak

         

Duncan

7:03 pm on Jul 14, 2007 (gmt 0)

10+ Year Member



In order to get my site to look the same in IE7, Firefox and IE6 I've added the following style tweak for IE6 that works fine.

<head>
<link rel="stylesheet" href="screen.css" type="text/css" media="screen" />
<!--[if IE 6]>
<style type="text/css">
#mainmenu {
background-color:#f8f8f8;
margin-left:10px;
border:1px solid #505050;
float:left;
margin-bottom:10px;
}
</style>
<![endif]-->
</head>

I've tried to add the tweak to a separate ie6 stylesheet and reference it as below, but it doesn't work?

<head>
<link rel="stylesheet" type="text/css" media="screen" href="screen.css" />
<!--[if lt IE 6]><link rel="stylesheet" type="text/css" media="screen" href="ie6.css" /><![endif]-->
</head>

My doctype is XHTML 1.1

Can anyone tell me where I'm going wrong?

Thanks,
Duncan

DrDoc

7:14 pm on Jul 14, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



...
[if lt IE 6]
...

Don't you mean

[if lt IE [b]7[/b]]
?

Duncan

7:46 pm on Jul 14, 2007 (gmt 0)

10+ Year Member



The problem is with IE6. Everything looks fine in IE7 and Firefox using my screen.css stylesheet, what I want to do is have a separate IE6 stylesheet with my IE6 tweaks in it.

Cheers,
Duncan

penders

7:54 pm on Jul 14, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The problem is with IE6....

Exactly, and what you have (

if lt IE 6
) excludes IE6. "lt" reads "less than". Perhaps you should use what you had originally.... [if IE 6] - but this only targets IE6 ....? Or change it to what DrDoc suggests.

Duncan

8:10 pm on Jul 14, 2007 (gmt 0)

10+ Year Member



That's great - works just fine when I change it to IE 7. Thanks for your help - really appreciated.

Cheers,
Duncan