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 Make a Website CSS: Cascading Style Sheets Take a Mobile-First Approach

Not centering :(

i'v done what the Video has told me and watched over it a bunch of times but the text of my header stays put. this is a copy of my index.html section i changed

<header>
      <a href="index.html" id="logo">
        <h1>Josh Foy</h1>
        <h2>Designer</h2>
      </a> 

and this is my CSS that it affects

#logo {
text-align: center;
margin: 0;
}

Am i missing something really stupid that im gonna fit myself over the back of the head with or is something weird happening with the space time continuum!

1 Answer

What is logo?

Is that an ID or a class.

If ID, use #logo

If it is a class, use .logo

Regards, Jordan.

OK for some reason it wasn't letting me post snippets of my code onto this question but i just reopened it after having an hour break and its working after not changing anything i don't know what was going on but thanks for the quick answer i appreciate it :)

James Barnett
James Barnett
39,199 Points

Josh Foy -

I fixed your code formatting.

For future reference ...

The forum uses markdown to correctly format code, check out this thread on how to type code in the forum for some examples.