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
Doug Hawkinson
Full Stack JavaScript Techdegree Student 25,073 PointsPinpoint centering (vertical and horizontal) within a container
I have built containers for my heading area so that I can pinpoint center My name in the left side of the Heading space and pinpoint center my page navigation in the right side of the header space. My name centers perfectly middle & center. However the page navigation centers top & center. I am using vertical-align: middle; and text align:center; in both cases. There is one other problem too. I have set and Id=”selected” on the li related to the current page. I have also set a #selected element to change that selection to a white font. That isn’t happening either. I have included links to code and the screenshot residing in codedpen.io:
https://s3-us-west-2.amazonaws.com/s.cdpn.io/405383/scrShotUpperRight.png
Patrice Nko'o
Courses Plus Student 50,511 PointsPatrice Nko'o
Courses Plus Student 50,511 PointsHi Doug,
First, I will recommend you to use a class instead of an ID, second, I will ask you to use the developper tools so that you can play and see what work or not: On Chrome screen, go to View -> Developer -> JavaScript Console
All the Best Pat