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.

CSS How to Make a Website CSS: Cascading Style Sheets Take a Mobile-First Approach

Adam Wagerman
Adam Wagerman
697 Points

hi there, I've followed along to a T but I can't get my header info to center. Please help.

all my code matches nick's as far as I can tell, but still the header info will not center. https://teamtreehouse.com/workspaces/8214602#

Adam- Could you post your code that you need help with?

Hi Adam, unfortunately we can only view your workspace preview if you currently have the code for that workspace open and active.

If you would like to take a snapshot of the workspace you an do so in the top right with the camera icon, that will give you a URL you can post for us o see your code easily :)

Craig

Adam Wagerman
Adam Wagerman
697 Points

https://w.trhou.se/w8r4q84u5y Thats my code. I still can't figure out why the text won't center

2 Answers

Hi Adam,

There are a few little errors in your HTML that will be throwing of the selectors in your CSS,

double check all of your ID and Class attributes in your HTML to make sure they have and '=' sign like this class="" rather than currently a few have this - class:""...

This may well be the main issue but i will check some more let me know how this goes :)

Craig

I have spotted a HTML tag that needs a little adjusting to, your "sections" tag just needs changing to be a "section" tag :) these are extremely minor errors so please don't get frustrated things like this are so easily done. :)

Adam Wagerman
Adam Wagerman
697 Points

That was certainly it. Thank you sir.

Adam

No problem at all Adam glad I could help :) happy coding!!

Joao Pedro Portela G. Vaz
Joao Pedro Portela G. Vaz
4,507 Points

If you are working with a div within a div, try using the code below:

display: block;
margin: 0 auto;