CSS CSS Layout Basics CSS Layout Project Column Layout with Media Queries

Mino Karadzhov
Mino Karadzhov
8,167 Points

My footer is collapsing, even after clearfix

Hey Guys, I'm having a problem with CSS Layout Project. Even after I use clerfix class on main-header container and on column container, my main-footer is still collapsing on medium and large screens. You can see my code here:

https://teamtreehouse.com/workspaces/36285612#

Thanks !

3 Answers

Steven Parker
Steven Parker
203,990 Points

You can't share a direct URL to a workspace, those are temporary and only exist while you are using it. But you can use the snapshot function (the little camera icon in the upper right) and share the link that makes.

But just guessing, it sounds like your clearfix may have a syntax error. If I recall, the floats only apply to the screen sizes where you are seeing the collapse.


Update: The HTML in the snapshot doesn't show the clearfix applied to the footer. You could add it like this:

    <footer class="main-footer clearfix">
Mino Karadzhov
Mino Karadzhov
8,167 Points

Hey again! This is my first time, I'm reaching the Treehouse community and I didn't knew anything about taking snapshots in workspaces. However, this is a link to the snapshot - https://w.trhou.se/ojc5txke3q

Jordan Wren
Jordan Wren
30,426 Points

You could also try adding footer { clear: both;} in the style.css file.