I have two divs one after the other:

HTML Code:
<div id="myDiv" style="float: left; width: 500px;">


<div id="myDiv2" style="width: 500px;">

my goal here was to have the first one on the top left of the page, and the second one immediately to the right of it, but the second one is still below the first one.

Could you please point out what I am doing wrong?