mercredi 6 mai 2015

CSS Background Image Not Adapting With Screen Size

I am a relatively new at HTML / CSS. I have started to develop a website but my main "hero" image doesn't adapt properly with smaller pages and leaves white space. If you could help me diagnose the problem it would be greatly appreciated.

*/ css */

#intro {
    z-index: 100;
    width: 100%;
    height: 66%;
    background: url("../images/intro2.jpg"); center center no-repeat;
    background-size: cover;
    background-repeat: no-repeat;
    top:10%;
    background-position: 0px -150px;
    left: 0;
    position: absolute;
    background-size: 100%;
}
#intro .wrap{
    margin: 0 auto;
    position: relative;
}
#intro .content{
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    vertical-align: baseline;
}

*/ html */

<section id="intro">
    <div class="wrap">
        <div class="content">
        <h1 id="welcome"> Your number one choice for music <br> in the south coast </h1>
        </div>
    </div>
</section>

The site can also be viewed Here

Aucun commentaire:

Enregistrer un commentaire