Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

how to put one div to be a footer inside of a bigger main div

I want simple header -> content -> footer sections in my div.
What I want to achieve is this: enter image description here

and this is my jsfiddle

I don’t get it very well this relative layout which I tried to use for my footer. Relative layout should be looking for its parent element (in this case class="main" and based on main class to adjust bottom:0 to its bottom border of main class, however, it doesnt work in that way.)

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Where I went wrong?

>Solution :

Use Flex

.procedure-box {
        border: 1px solid #ada9a9;
        /* display: inline-block;*/ /*Remove this*/
        display:flex; /*Add This*/
        flex-direction:column; /*Add this*/
        height: 350px;
        width: 300px;
        margin-right: 15px;
    }
    .header {
        text-align: left;
        margin-left: 15px;
        margin-right: 15px;
    }
    .content-body {
        text-align: left;
        margin-left: 15px;
        margin-right: 15px;
        flex:1;  /*Add this*/
    }

https://jsfiddle.net/lalji1051/h3fm9nt0/1/

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading