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

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

after applying the text-align value to my #logo selector my header still has a left alignment. How can fix that?

a {
  text-decoration: none;
}

#wrapper {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 5%;
}

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

4 Answers

Jeroen Augustinus
seal-mask
.a{fill-rule:evenodd;}techdegree
Jeroen Augustinus
Front End Web Development Techdegree Student 5,931 Points

Did you give your anchor element the correct id of logo? I don't see anything wrong with your css so it might be in your HTML, it could be that you gave it a class, named it Logo (case sensitive) or perhaps you add the id to the header element instead of the anchor element?

My part of the html looks like this, maybe compare and see if you got it the same way (except for it being your own name in the h1 of course :P) :

<a href="index.html" id="logo">
        <h1>Jeroen Augustinus</h1>
        <h2>Designer</h2>
</a>

Thank you for the help. I had it camel cased on accident and did not properly identify it in the css.

massimilianobennici
massimilianobennici
1,880 Points

I have the same problem like Richard.

my HTML and CSS are correct but my header has still a left alignment ! Of course i refreshed the page. I also closed it and reopen it, but nothing changed !

Thanks for help...

massimilianobennici
massimilianobennici
1,880 Points

I found the mistake. I wrote logo miniscule in CSS and capitalize in HTML !!

Thank you