Saturday, November 15, 2008

DIV inside another DIV

DIV inside another DIV
Parent and Child DIVs: Border and Width


   <div style="border: solid 5px red; width: 50%">
        <div style="width: 100%; border: solid 5px blue;">
        </div>
    </div>





    <div style="border: solid 5px red; width: 50%">
        <div style="margin: 0 -5px; width: 100%; border: solid 5px blue;">
        </div>
    </div>





    <div style="border: solid 5px red; width: 50%">
        <div style="border: solid 5px blue;">
            </div>
    </div>





    <div style="border: solid 5px red; width: 50%">
        <div style="border: solid 5px blue;">
           Content</div>
    </div>


Content



    <div style="border: solid 5px red; width: 50%; height: 70px">
        <div style="border: solid 5px blue; width: 120%; height: 120px;">
           Overlapping Divs</div>
    </div>


Overlapping Divs

No comments: