In the following snippet, my thought on absolute positioning is div#disco is positioned absolutely with regards to div#containingbox. However my little experiment places this div in relation to the viewport. So absolute positioning takes a block level element out of its normal flow?



What am I missing?

<style type="text/css" media="screen">
<!--
body{
        margin: 0;
        padding: 0;
        background-color: #eee;
        background-image: url(images/base.jpg)
        color: 000;
        font: 80% Arial, Verdana, Geneva sans-serif;    
}
#containingbox{
        border: 1px solid #666;
        background-color: fff;
        color: 000;
        width: 500px;
        padding: 5px;
        margin: 0px auto;
        text-align: justify;
        }
div#disco{
        position: relative;
        top: 10px;
        left: 10px;
        

}

-->
</style>

<body>
<div id="containingbox">
<p>
Lorem..
</p>
<div id="disco">
<p>
Lorem ..
</p>
</div>
<p>
Lorem ...
</p>
<p>
Lorem ...
</p>
</div>

</body>




"Imagination is more important than knowledge." -Albert Einstein

Chris
http://ckimedia.com

******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************



Reply via email to