Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

trying to add a background-image

<!DOCTYPE html>

<html lang="eng">



    <head>
        <meta charset ="utf-8">
        <link rel="stylesheet" type="text/css" href="index.css">
        <title> Havana Studios|Makeup Artist
        </title>

    </head>

    <body> 

            <header>


            <h1>
                Havana Studios

            </h1>

            </header>

        <hr>

            <section>

                <div class="p1">

                <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus non finibus dolor. Aliquam hendrerit at lectus nec semper. Ut venenatis purus eget bibendum dictum. Suspendisse potenti. Sed ornare nulla risus, et porta dui pellentesque eget. Nunc rhoncus nunc nisi. Quisque convallis ac magna ac aliquet. Nulla sed varius justo, vitae auctor ante.
                </p>



                <div class="p2">

                <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus non finibus dolor. Aliquam hendrerit at lectus nec semper. Ut venenatis purus eget bibendum dictum. Suspendisse potenti. Sed ornare nulla risus, et porta dui pellentesque eget. Nunc rhoncus nunc nisi. Quisque convallis ac magna ac aliquet. Nulla sed varius justo, vitae auctor ante.
                </p>

                </div>  




            </section>


        <footer>
            <p class="copyright"> 

                &copy;2015 Havana Studios.

            </p>

        </footer>

    </body> 





</html>

CSS

/* Main-Header */


header {
    background-image: img(url'../havana_studios/img/header.jpg');
}

h1 {
    background:plum;

    margin: 300px 0px 300px 0px;
    text-align: center;
}


/* Main-Content */

.p1  {

    margin: 200px 0px 200px 0px;

}

.p2 {

    margin: 200px 0px 200px 0px;
}




/* Main-Footer */

.copyright {
    text-align: center;
}

1 Answer

Ryan Field
PLUS
Ryan Field
Courses Plus Student 21,242 Points

Hi, Rana. You've just got a small formatting error for your image url. It should look like this:

header {
    background-image: url('../havana_studios/img/header.jpg');
}

Thanks for this answer. I put it into my css but it still did not work. The image is not showing up.