Thanks to Chris and Tom,
I ended up adding a wrapper DIV around the topnav DIV to make it center
correctly. Thanks Guys.
To restate the problem is a different way.
The challenge is to display a light blue bar 33pixels high across the top of
the page. Within that bar, place the global links Home |
Can you help me understand how to center text vertically within a DIV that
is also center on the page?
I am trying to position a DIV in the center of the page and then place text
on the right side and centered vertically within the DIV.
I can center the DIV with this definition. I color the
Here are two options: http://codepen.io/anon/pen/kKAfG
If you want to use display: table-cell, you need to wrap it in a parent
element that has the auto margin applied.
If you want to skip display: table-cell, you can use line-height. The
line-height method seems error prone, should you change t