1 reply [Last post]
istuartw
Offline
Regular
Last seen: 17 years 26 weeks ago
Joined: 2005-02-08
Posts: 13
Points: 0

Hello all,

I'm trying to implement an IE fix for min-width that was posted by David Elliot while including the #main style declaration in the head. But, the page is not reading the style at all for #main. What am I missing? Could there be a conflict becuase I previously link to a style sheet for other selectors?

Code

<head>

<link rel="stylesheet" type="text/css" href="rdstyle.css">

<style type="text-css">
#main {

background-color #ffffff;
border-left solid #000000 1px;
border-right solid #000000 1px;
border-bottom solid #000000 1px;
margin-left 180px;
margin-right 180px;
margin-top -100px;
padding 10px;
min-width 160px;

}
</style>

<!--[if IE]>
<style type="text-css">
#main {
background-color #ffffff;
border-left solid #000000 1px;
border-right solid #000000 1px;
border-bottom solid #000000 1px;
margin-left 180px;
margin-right 180px;
margin-top -100px;
padding 10px;
widthexpression(document.body.clientWidth < 160? "160px" "auto" );

}
</style>
<![endif]-->

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

</head>

Thanks!

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 30 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Am I totally missing something here?

There's not much to go on, it looks as though it should read those styles , I presume that the type="text-css" is a typo on posting ? other than that when you say is not reading the styles does that mean either of the #main rule sets or is it just the expression statement that's not working.

Hugo

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me