internet explorer - CSS simple float left problem in IE compatability mode -


i'm trying 2 boxes side side (a 200px left menu, , next 100% remaining width main content area).

it works fine in browsers, lot of our clients using ie6 (nothing can unfortunatly), must support ie compatability mode. unfortunatly, simple css not work! can me without me needing resort tables?

relevant css:

.clear {     clear:both; }  /* left menu */ .leftmenu{     width: 200px;     border:1px solid green;     height:100px;     float:left; }  /* main content area */ .mainbox{     width:100%;     border:1px solid red; } .mainwrapper{ }     <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">    <html xmlns="http://www.w3.org/1999/xhtml">  <head><title>    </title><link rel="stylesheet" type="text/css" href="css/default.css" /></head>    <body>      <form name="form1" method="post" action="default.aspx" id="form1">  <div>  <input type="hidden" name="__viewstate" id="__viewstate" value="/wepdwukltiwnjayodu4m2rk5phxj78kc9kf0nxvcj7j7tqjpxw=" />  </div>      <div class="mainwrapper">          <div class="leftmenu">          left          </div>          <div class="mainbox">          main          </div>          <div class="clear"></div>      </div>        </form>  </body>  </html> 

don't have ie6 cannot test, anyway. try removing width: 100% .mainbox , remove borders , instead use background color testing. got work in ie7 standards way.

.mainbox div not have floats implicitly 100% wide. borders add width may cause unexpected behavior while testing.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -