CSS CSS Layout Basics Getting Started with CSS Layout Centering Page Content and Creating a Full-width Header

Charles Dunn
Charles Dunn
5,817 Points

My footer seems to have a bottom margin applied when browser window is greater than a certain height.

When I resize my browser window beyond a height of about 750px the footer seems to have a bottom margin applied. Is this something that will be addressed later via responsive layout design or I am missing something?

/* ================================= 
  Base Element Styles
==================================== */

body {
    line-height: 1.6;
    color: #3a3a3a;
}

a { 
    color: #fff;
    text-decoration: none;
}


/* ================================= 
  Base Layout Styles
==================================== */

/* ---- Navigation ---- */

.name {
  margin: 0;
}

/* ---- Layout Containers ---- */

.container {
  width: 70%;
  margin: 0 auto;
}

.main-header {
    background: #3acec2;
  padding: 1em 0;
}

.main-footer {
    padding: 2em 0;
    background: #d9e4ea;
  text-align: center;
}

1 Answer

Steven Parker
Steven Parker
203,990 Points

I don't see anything that would create a margin. I think the page contents take up about 750 px and what you are seeing is just the excess window beyond the content.

Try making the window more narrow (to increase line wrapping) and see if the "margin" doesn't go away.