treehouse : what would you like to learn today?
Web Design Web Development iOS Development

positioning "header" outside the "wrapper" div

  • I would like the header image to jut outside the brown "wrapper" div it's contained in.
    I am using Genesis Framework. I supposed I create another div, but want to see if I can do this using CSS. Here is the CSS I am using. I tried using a position attribute, but none were working.

    http://www.palettedesign.com/

    #wrap {
    background-color: #aa6d24;
    margin: 75px auto;
    width: 960px;
    padding: 0;
    }


    #header {
    margin-top: -25px;
    margin: auto;
    height: 198px;
    width: 100%;
    background: url(images/head.png);


    }
  • #wrap {
    background-color:#aa6d24;
    margin:75px auto;
    width:960px;
    padding:0px 0px;
    position:relative; /* add relative position */
    }

    #header {
    margin:auto;
    height:198px;
    width:100%;
    background:transparent url(images/head.png) no-repeat;
    position:absolute;
    top:-208px; /* height + 10 */
    left:0px;
    }
  • Thank You :)