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

How to center my div on my contact page?

https://w.trhou.se/6bt3wtguul

I've included the link above for the current project I've been working on to help retain information I've been learning off of the treehouse videos. So, I believe that I did center the div that contains the content on the contact page, but it doesn't look centered to me? Any suggestions? Thank you in advance for your help :).

2 Answers

there are two quick ways to center a div. (as long as the parent div is not altered) margin: 0 auto, or text-align: center if the the div seems off see what the parent div is set to then make adjustments.

Thank you for the quick response, I appreciate it :).

Not a problem!