Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9246171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:25:58+00:00 2026-06-18T09:25:58+00:00

I got a css problem. Consider the following layout: <div class=footer-container style=background: #ff00ff> <footer

  • 0

I got a css problem. Consider the following layout:

<div class="footer-container" style="background: #ff00ff">
 <footer class="wrapper"><h4 style="margin: 20px 0">Some Headline</h4></footer> </div>

The vertical margins of h4 don’t extend the container div, Instead they “spill over”, so that there is a 20px margin outside the container div above and below, which doesn’t have any backgroundcolour.
I know that vertical margins of adjacent elements collapse but this seems to something else.

Thank your for your replies!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T09:26:00+00:00Added an answer on June 18, 2026 at 9:26 am

    Adding overflow:auto to your containing div would fix your collapsing margin issue:

    <div class="footer-container" style="background: #ff00ff;overflow:auto">
    

    jsFiddle example

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have got this css: <style type=text/css> #heading{ margin:auto; background-color: brown; } </style> and
I've got a problem in my CSS layout where, I have a container which
I got this CSS layout: http://www.cssdesk.com/Lgg4q HTML <div id=wrap> <div class=img-wrap> <img src=http://unikatmag.de/wp-content/uploads/2010/11/team-dummy.jpg />
I got the following css: div#header, header { height: 88px; width: 100%; background-image: url('/images/header.jpg');
I got a problem :/ I got a CSS thingy thast makes the background
I got problem with the css of my blog. The div or p tag
I've got a problem with IE 8 CSS. * { margin: 0; padding: 0;
I've got the following problem. I need to set a width of one div
Can anyone help with a small problem. I've got a nice simple CSS dropdown
So I've got style.css which defines all my CSS classes. But I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.