Not sure, if that's what you want, but you could make the inner div an inline-element. This way the border should be wrapped only around the text. Even better than that is to use an inline-element for your title.
Solution 1
<div id="page" style="width: 600px;">
<div id="title" style="display: inline; border...">Title</div>
</div>
Solution 2
<div id="page" style="width: 600px;">
<span id="title" style="border...">Title</span>
</div>
Edit: Strange, SO doesn't interpret my code-examples correctly as block, so I had to use inline-code-method.