James Bray
James Bray

Reputation: 27

Background color not changing in div despite setting it

I feel like I'm going crazy, this is simple stuff yet it just refuses to work, I've done it a million times (although it's been awhile.)

<!doctype html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>Untitled Document</title>
    </head>
    <style type="text/css">
        title {
            background-color: #000000;
            float: left;
            margin: 5px;
            padding: 15px;
            overflow:auto;
        }
    </style>
    <body>
        <div class="title">
            <p>
                <img src="images/new/Salon.jpg" width="530" height="180" style="" border="0" />
            </p>
        </div>
    </body>
</html>

The background color is not changing and that is literally all I've coded so far

Upvotes: 0

Views: 137

Answers (1)

Johannes
Johannes

Reputation: 67748

You wrote

title {

instead of

.title {

Upvotes: 2

Related Questions