Previous Message
Next Message

IE absolute positioning issue

Sent by Alexandru Objelean on 30 March 2005 07:07


Hello!
I have a problem with IE 6.0. There is a relative positioned and also
float container, which width depends on its content. Inside it I have an
absolutely positioned container, which I want to have the same width as
the relative container. If I say it to be 100%, it is Ok in Mozilla and
Opera, but in Explorer it behave completely different. How can I trick
IE?

Here comes the code:

HTML:

<div class="relative">
	relative and float container
	<div class="absolute"></div>
</div>

CSS:

   div.relative {
     float: left; // I need this container to be float
     position: relative; 
     border: solid red 1px; // Put border to see what happens
     padding: 1em;
   }
   div.absolute {
     position: absolute;
     border: solid green 1px;
     top: 0;
     left: 0;
     width: 100%; // Here is the problem... What should I do in IE?
     height: 100%;
   }
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread:

Possibly related: