Ischa Gast wrote:
> I have a container with some padding inside it. In that container I have a
> div that I want to push to the right with a negative margin.
> But IE does something really strange, it pushes it outside the box. I
> thought this was the double margin bug so I inserted display:inline in my
> CSS.
> After that it looks more ok but it doesn't push it totaly to the right just
> like all other browsers.
>
> I can fix this with a margin-left:38px; But I wanted to know if someone
> knows a less ungly fix for this problem?
>
> I have made an example page: http://ischagast.nl/double_margin_bug.html
Why do you have this padding right? The below CSS will render this
construction much like what is currently seen in FF.
.floatholder {
width: 480px; /* CHANGE */
margin-bottom:2em;
padding:10px; /* CHANGE */
border: 2px solid #000;
background: #dc8;
zoom:1; /* DELETE not required since width above is a hasLayout
trigger */
}
.floatbox {
float: right;
width: 150px;
height: 150px;
margin: 0; /* CHANGE */
background: #aa6;
border: 1px solid #00f;
color: #ffd;
font-size: 1.8em;
text-align: center;
}
--
Alan http://css-class.com/
Nearly all men can stand adversity, but if you want to test a man's
character, give him power - Abraham Lincoln
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/