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 trialMichal Dunski
Courses Plus Student 3,136 PointsWhy is the footer floating like one of the images despite not being a part of the <ul id="gallery>?
I can't get it, why is it behaving like that even though the float setting are not assigned to that element?
2 Answers
Julian Aramburu
11,368 PointsWhen you float an element it doesn't follow the flow of the page...so if you float an element and it has another element underneath the last one will get over that element until you float it too or add clear: left/right/both to it.
Michal Dunski
Courses Plus Student 3,136 PointsThank you for the responses, now it's clear.
Julian Aramburu
11,368 PointsHi Michal! Maybe you need to clear your footer element? Otherwise paste your code in here so we can help you out!
Michal Dunski
Courses Plus Student 3,136 PointsYes, of course. It's more of an theoretical question actually, why does this setting affect the element that shouldn't be affected as it's set to #gallery, which doesn't contain a footer? I'm just asking, because it seems illogical to me.
Simon Duchaine
14,441 PointsSimon Duchaine
14,441 PointsCan you paste your code?