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
sandygomez
2,498 PointsCan you use semantic elements as containers?
for example in my footer I have 2 sections each labeled with a class. 1st one is of related post images and is floated left. The 2nd one is is made up of the about us/copyright info and is not floated, But it sits side by side to floated content.
to prevent the 2nd one from wrapping underneath floated content I have added a overflow: hidden. From what I have read you have to add this to the container, which I thought would be the footer tag element as it contains both of these....But, It only works if I label the footer with class <footer class="container" and use this class in my css ex: .container: overflow: hidden;
It also worked when I added my overflow:hidden; to the 2nd class inside the footer which is not floated?
Can anybody clear this semantic/container question up for me?
sandygomez
2,498 Pointshttp://codepen.io/sandyngomez/pen/EjRNQV/?editors=110
actually just rechecked and adding a class to footer then using css overflow: hidden, did not work to clear the float?? only adding overflow hidden to the 2nd class in the footer
1 Answer
John Norris
22,455 PointsCode plz
rydavim
18,814 Pointsrydavim
18,814 PointsWithout seeing the code, it's hard to say why this might not be working. You should be able to use semantic elements like footers for styles, including overflow: hidden.
If you'd like to post your code here, we might be able to help troubleshoot why you're seeing this behavior.
Edit - You can share your workspace using snapshots, which is used via the camera icon in the top right of workspaces. If you post the resulting link here, we'll be able to see your current code and file structure.