I'd start by getting rid of all the extra newlines, and also put some effort into creating indented html code. I know that it's not always straightforward doing so when you also want to keep your php code indented, but keeping some measure of indentation sanity helps a lot when reviewing your html code.
For example, by removing newlines, and doing a little indentation work on your html code I immediately noticed that you have two <div id="bodydiv">, and the id attribute has to be unique across the whole page. I'm guessing you meant to have only one of those...
But anyway, you're almost there if I correctly understand what you're after. Once again, if you do not allready have Firefox with the Firebug plugin, get it! I rclicked your login form and select "inspect element", and then get a new window showing the DOM tree.
Working off a hunch, I clicked the navbar div in this tree, copy HTML
Then rclicked the content div, edit HTML, and right before the closing div tag (last in this view) I pasted the previously copied HTML code to move the entire navbar code into its proper place.
Then I did the same thing with the bodydiv div.
And finally I rclicked the initial bodydiv and navbar div and selected "delete element". To me it looks as if this is the page you're after.
Or, in other words, what you want seems to be
<div id="container">
<div id="content">
<div class="htmlheader">PHP_HEADER</div>
<form id="logform">LOGIN FORM</form>
<div id="navbar">
<div>PHP_MENU</div>
</div>
<!-- extra bodydiv? either way, the id attribute has to be unique across the whole page
I chose to remove one of these with a comment -->
<!-- <div id="bodydiv"> -->
<div id="bodydiv">BODY</div>
</div>
</div>