Grow your CSS skills. Land your dream job.

Content area is not expanding to footer

  • # February 27, 2013 at 11:48 pm

    My CSS

    body {
    margin:0;
    width:100%;
    }

    #page {
    background-image:url(Images/bg4.jpg);
    background-repeat:repeat;
    height:100%;
    position:relative;
    }
    #headerback {
    background:#000;
    height:125px;
    left:0;
    width:100%;
    top:0;
    border-color:black;
    }
    #header {
    background-color:black;
    width:1024px;
    height:125px;
    border-top-left-radius:5px;
    border-top-right-radius:5px;
    margin:0 auto;
    color: #FFFFFF;
    }
    .header-image {
    display:block;
    width:248px;
    height:124px;
    max-height:100%;
    max-width:100%;
    overflow:hidden;
    margin-left:10px;
    float:left;
    }
    .header-text {
    text-decoration-style:wavy;
    font-family:’Adobe Hebrew’;
    font-size:25px;
    color:whitesmoke;
    margin-top:15px;
    margin-left:50px;
    width:550px;
    float:left;
    text-align: center;
    }
    .header-text-bottom {
    text-decoration-style:wavy;
    font-family:’Adobe Hebrew’;
    font-size:20px;
    color:whitesmoke;
    margin-left:300px;
    width:200px;
    margin-top:10px;
    float:left;
    text-align: right;
    }

    #Content-body {
    background:#d9bf30;
    height:auto !important;
    height:100%;
    position:relative;
    width: 1024px;
    text-align: left;
    margin: 0 auto;
    min-height:100%;
    }
    #footer {
    background:#000;
    width:100%;
    height:100px;
    position:absolute;
    bottom:0;
    left:0;
    }

    My HTML







    • A fit, healthy body that is the best fashion statement ― Jess C. Scott
    • “The greatest wealth is Health.”
    • “Those who think they have no time for exercise will sooner or later have to find time for illness.” ~Edward Stanley
    • “Time And health are two precious assets that we don’t recognize and appreciate until they have been depleted.” ~Denis Waitley
    • “From the bitterness of disease man learns the sweetness of health.” ~Catalan Proverb
    • “Take care of your body. It’s the only place you have to live.” ~Jim Rohn
    • “Your body is a temple, but only if you treat it as one.” ~Astrid Alauda
    • “Healthy citizens are the greatest asset any country can have.” ― Winston Churchill


    # February 28, 2013 at 1:36 am

    I would suggest that you put this in Codepen as it’s difficult to analyse from the raw code.

    # February 28, 2013 at 1:37 am

    Certainly you can’t do this….

    height:auto !important;
    height:100%;

    # February 28, 2013 at 2:47 am

    @paulie_d :- Sir can you please tell me what to do to make it correct

    # February 28, 2013 at 6:24 am

    Do you mean the footer is not sticking to the bottom?

    # February 28, 2013 at 6:35 am

    @JamesMD :- No Sir My Footer is sticking to bottom but I want my content area to expand till footer irrespective of the content in it.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".