Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS div not taking the background color of parent div…

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #34601
    Tyler
    Member

    I have a div that will not take the div of it’s Parent Div and I can’t for the life of me figure out why…

    My contentContainer div is not taking the background color from the wrap div. As far as I can see it should be taking it but not…

    All help is greatly appreciated!

    Tyler

    HTML CODE






    Please Promise - Kalamazoo, MI














    CSS CODE


    /*
    GLOBAL STYLES
    */
    body {
    background-color: #3e3e3e;
    }

    img {
    display: block;
    }

    div#wrap {
    width: 1000px;
    margin: 0 auto;
    background-color: #e1e1e1;
    }

    .oneThird {
    width: 30%;
    margin: 2%;
    float: left;
    }

    .twoThirds {
    width: 62%;
    margin: 2%;
    float: left;
    }

    /*
    HEADER STYLES
    */
    ul#navContainer {
    width: 1000px;
    height: 36px;
    background-color: #e1e1e1;
    }

    ul#navContainer li img {
    float: left;
    }

    ul#navContainer li#navNation {
    margin-top: -8px;
    float: left;
    visibility: visible;
    }

    div#navBreak {
    width: 1000px;
    height: 3px;
    background-image: url(../img/navBreak.jpg);
    }

    div#headerSlide1 {
    border-bottom: 3px solid #000;
    }

    /*
    MAIN CONTENT STYLES
    */
    div#contentContainer {
    background-color: #e1e1e1;
    }

    div#newsContainer {
    width: 620px;
    height: 37px;
    background-image: url(../img/headerNews.png);
    }
    #136185
    naveenbos
    Member

    Try like this
    div#wrap {
    width: 1000px;
    margin: 0 auto;
    background-color: #e1e1e1!important;
    display:inline;
    position:absolute;
    }

    This will may help you. Goodluck

    #136192
    Paulie_D
    Member

    >Try like this div#wrap { width: 1000px; margin: 0 auto; background-color: #e1e1e1!important; display:inline; position:absolute; }

    There are so many things wrong with this.

    At least try and explain WHY you are recommending this course of action.

    Look at @wolfcry911 ‘s respose for an example.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.