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

Shane Dalton
Shane Dalton
12,412 Points

Header Elements (H1 and H2) not aligning in the middle

I have followed tag by tag my code and this is puzzling me. Maybe someone can spot this easier than me.

I am using Opera because workspaces wont work on any other browser but even Opera throws up problems. Certain html comments can throw code off. I've even tried loading this code through notepad++ using Chrome.

Works fine but the #logo anchor element will not work. My H1 and H2 header elements wont align in the middle as per the video [Take a Mobile-First approach]

Here is my workspace snapshot https://w.trhou.se/e24bgd8k5k

Thanks in Advance :-D

Shane

William Polliard
William Polliard
13,039 Points

Hey Shane,

Simple spelling error. In your #logo rule you spelled center as centre. Modify that and you should be good to go.

2 Answers

Justin Iezzi
Justin Iezzi
18,199 Points

Hi Shane. Looks like a minor typo. You'll want to use text-align: center; instead of text-align: centre;

It's just a matter of CSS using American English.

Shane Dalton
Shane Dalton
12,412 Points

Thanks Guys,

That was it! 45 mins of checking my work for two letters! :-D haha.

Yeah it was my Irish way of spelling! :-)

Thank you both for helping so quick!