It may appear an obvious question, but check this fiddle which contains the following code
<div style="border:1px #aaa solid;" id="srd_header">
<button style=" float:right" onClick="window.external.Test();">Close</button>
</div>
As you see, the button doesn't position inside the div
and the division doesn't surround the button! I used float:right
for the button to push it to the right side.