Recent Posts
- (02/24) Calling an Element from a Helper TAGS:CakephpWeb ProgrammingUsageTutorialExample
- (10/14) Forcing A Single Join in CakePHP PaginationTAGS:CakephpCakephp 13DatabaseErrorsHabtmMysqlMssqlWeb ProgrammingUsage
- (08/11) Inserting NOW() into MySQL Using CakePHPTAGS:CakephpDatabaseMysqlMssqlWeb ProgrammingUsage
- (08/07) Best PaginateCount for CakePHP - with Group By SupportTAGS:CakephpBehaviorsWeb ProgrammingUsageDatabaseExampleMysqlHabtmHack
- (04/03) CakePHP Error Messages Not Showing on FormTAGS:CakephpCakephp 13Web ProgrammingErrorsUsage
- (02/06) Sorting Paginated Results Using a Related Model Field in CakePHPTAGS:CakephpWeb ProgrammingUsageExample
- (11/02) Changing CakePHP's Model useTable on the FlyTAGS:CakephpWeb ProgrammingMysqlDatabaseExampleTutorial
- (10/18) The Funniest Error Message Ever - Thank You EclipseTAGS:EclipseWeb ProgrammingErrorsHumorWindowsUsageSoftwarePhpCakephp
Subscribe to my feed
MainelyDesign.com Blog
Faking min-width CSS style in IE6 and IE7
Posted on 07/16/2009 at 01:50 pm by Kevin Wentworth
Viewed 1,663 times | 0 comments
It's a hack... but it's needed to make a truly cross-browser fluid layout. It's simple, if you want to implement min-width in IE6 and IE7, use the following CSS code: (I didn't create this originally, sorry, lost the source)
- /*********************
- ** IE 6.0 min-width hack
- ********************/
- * html div#contentWrap {
- width:expression(((document.compatMode && document.compatMode=='CSS1Compat') ? document.documentElement.clientWidth : document.body.clientWidth) < 1000 ? "840px" : "85%");
- }
Just make sure you actually specify the min-width for all other browsers:
- div#contentWrap {
- position: relative;
- margin: 0px auto;
- padding: 0px;
- width: 85%;
- min-width: 840px;
- text-align: left;
- z-index: 1;
- }
That's it.
Cheers,
-Kevin Wentworth
Tags for Faking min-width CSS style in IE6 and IE7
Css | Web Design | Hack | Internet Explorer | Ie
Comments for this Posting
No comments. Be the first to post a reply.
Sorry, comments are closed for this posting.
Please Email Kevin if you have any questions. Thanks!
