Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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
231,275 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.