billy
billy

Reputation: 41

Div under a div

I'm kind of stuck on what seems to be something trivial but I just can’t get my head round it.

Basically I have the address div and then the menu..... Which should go under the address div but it’s seems to be floating next to the address div.

Any help will be much appreciated.

Upvotes: 0

Views: 158

Answers (3)

terrygarcia
terrygarcia

Reputation: 477

Frankly, <br /> would probably do the trick. But if you're like me, you think that <br /> is for text only. #address{display: block;}#contact-menu{display: block;} should do the trick, as block elements force a line break before and after the element. Didn't bother editing the CSS; hope it helps.

Upvotes: 0

methyl
methyl

Reputation: 3312

Add clear:both to #contact-menu.

Upvotes: 0

Czechnology
Czechnology

Reputation: 14992

Add a clear directive to your menu:

#contact-menu {
    clear: both;
    text-align:center;
    padding-top:90px;
}

That tells the browser that there are no floating elements allowed on either side of the contact menu.

Upvotes: 3

Related Questions