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

My H1 is not responding to Float:Left

Hi!

When I'm on the responsive part of this course, everything works except for the H1. It looks like it has indentation. The H2 (which is part of the same class) is actually responding to the float property so I don't know what's happening.

Please help me :(

https://w.trhou.se/awperv3m3z

2 Answers

Hey Priscilla, if you look at the H1 in your main.css-file you can see, that the text-align is centred. You have to change the text-align in the "H1" in responsive.css to "text-align: inherit;" so the "text-align: center;" of the main.css gets overwritten and will not longer work for the other devices.

All in all:

  1. Go to "responsive.css"
  2. Go to the "h1"-element
  3. Add: "text-align: inherit;"

I hope I could help you!

Hi Priscilla,

What Goblin is suggesting will work but it is overriding a style that I don't think needs to be there in the first place. Simply removing the text-align: center; from line 54 of main.css should do the trick.

Hope this helps.