You are nesting block level elements inside inline elements, which is not allowed. I.e.
Code:
<a href=""><div class="navi_primary_names"></div></a>
Should have been.
Code:
<a href=""><span class="navi_primary_names"></span></a>
If you want to give it semantic meaning, you should use the relevant tags for that.
You should also include your anchor in either paragraphs or lists. If its a menu you are making, using list would be a good idea. Both for accessibility reasons, as well as styling purposes, lists also generally allow for richer styling of your navigation links.
1: #navi_secondary The navigation with the yellow border, gets pushed to the right because your
#subheader is set to
70px! The Height of your
#subheader_login division is set to
48px, adding the height of
#navi_secondary gives
78. Adding 8 px to the height of your #subheader resolves the problem. But you may want to remove some of those height declarations, and maybe dump the pixel based layout intirely.
2: I assume what you want is the text to vertically-align to middle, because margin is not used for height. Use the relevant font properties for that. Applying a
line-height of either
100% or
30px, and a
vertical-align: middle; to your anchor, would align the text vertically. I.e.
Code:
#navi_primary a {
line-height: 30px;
vertical-align: middle;
}
You also got some obsolete properties in there, such as the overflow on your body, or the width

; which is default, note
. The width is not inherited.
Next time also try to provide us with a link, or leave out any php coding. As your php isn't relevant to the markup and style, and only complicates things. You can't expect us to Visualise how your code will look, most coders will need a working example. ;-)
You should also remember to include valid doctype, if you haven't done so already.