Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.


when i float anything on my css the structure of the page changes. How to solve?

when i float anything on my css the structure of the page changes. The footers comes to section.

I was trying to make the website responsive :(

even the border is not coming to the center. Anybody know how to make borders to the center?

How to solve?

1 Answer

Codin - Codesmite
Codin - Codesmite
8,600 Points

Floating an element removes it from the normal page flow in the same way as if you had set the element to fixed or absolute positioning.

If responsive is your goal I would recommend using as little floats as possible and aim to use relative positioning, percentage sizes and CSS media queries to adapt to display sizes.

If you post your code here or on somewhere like www.codepen.io I can help show you how to acheive the layout you are aiming for and keep it responsive.