Click to See Complete Forum and Search --> : Simplest code for "Set margin-left for container..."


TaoDay
02-15-2007, 07:27 AM
Dear Friends!

After post this bug,
"Set margin-left for container => its input display wrong (http://www.webdeveloper.com/forum/showthread.php?p=714608#post714608)"
I work hard and try to find out solution. Althought simplest isolation code, there is no solution.

Bug Condition: IE 6.0
Try:
* Render in Standards compliance mode of Strict DTD
* Pass Css Validator
* Pass Xhtml Validator

Xhtml:


<form method="post" action="this" id="details">
<div id="cont_1">
<input id="contentName" type="text" />
</div>
</form>


CSS:


#details {
margin: 0px 0px 0px 100px;
background-color: yellow;
/*that input#contentName must place on the left of this block
but there are space with left border = form magin-left = 100px*/
}

#details div {
width: 90%;
}



If you have solution, please help.



How dump IE?(angry)

BonRouge
02-15-2007, 07:34 AM
Try this:#details {
margin: 0px 0px 0px 100px;
display:inline-block;
background-color: yellow;

}

TaoDay
02-15-2007, 10:50 AM
Wow!
It work. Thanks you.