Birdlady9604
Birdlady9604

Reputation: 207

HTML Div disappeared has height set

So I have a header container, inside is a navigation which is set to inline-block. Then there is a div .main_image with a background color:blue and then a welcome_text div. When I added the navigation the main_image div disappeared, I assumed that because I set a height it shouldn't. I tried to give it top positioning but I am not seeing it. The background color for the welcome_text div has disappeared as well.

Here is a link to my code:

http://jsfiddle.net/SR88E/

Here is my CSS:

.container{
    max-width: 960px;
    margin: 0 auto;
    height:900px;
}

header {
   height:100px;
   background-color: yellow;

}

nav {
    background: bisque;

}

nav li {

   display: inline-block;


}

nav li a{
    color: black;
    text-decoration: none;

.welcome_text {
        background-color: red;


}

.main_image {
    top: 100px;
    height:445px;
    background-color: blue;
}

Upvotes: 1

Views: 247

Answers (1)

Liftoff
Liftoff

Reputation: 25392

Your CSS was broken. There was no closing brace to nav li a

nav li a{
    color: black;
    text-decoration: none;
}  /*<-----You need this*/

JSFiddle

Upvotes: 5

Related Questions