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!

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


Jude McLean
Jude McLean
1,286 Points

Responsive Web Design Header Centralised on Mobile Site

I've come to stage 8 of the web design tutorial...and have applied the following code to the header of the responsive.css:

nav {
  background: none;
  float: right;
  font-size: 1.125em;
  margin-right: 5%;
  text-align: right;
  width: 45%;

However, when I minimize the browser the header/menu doesn't centralise as shown in the video tutorial. If anyone is willing to point out a possible error or solution that would be appreciated.

Thanks in advance

Andres Aguero
Andres Aguero
30,545 Points

try setting the display property to block like this

nav { width:45%; display:block; margin: 0 auto; background: none;}