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

matt gillie
matt gillie
847 Points

Header not in the middle

What have done wrong, my header is not in the middle.

HTML

<body> <header> <a href="index.html" id="logo"> <h1>Mathew Gillie</h1> <h2>Manager</h2> </a>

CSS

a { text-decoration: none; }

wrapper {

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

logo {

text-align: centre; margin: 0; }

2 Answers

Tobias Helmrich
Tobias Helmrich
31,602 Points

Hey Matt,

you have to write the center value of the text-align property the American way (center) instead of the British one (centre). I hope that helps! :)

matt gillie
matt gillie
847 Points

Hi Thanks.

I knew it would be something simple.

For easy reading of main.css

a {
   text-decoration: none; 
}

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

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