Creating a custom template for your own site can be fun, but to get the positioning of various parts of the page exactly right can sometimes result in a trial and error process.
Without a doubt, positioning, or the layout, is the hardest part of CSS. Not only because it ever so often varies between browsers, but also because CSS has a lot of ways to position an element, all with various (dis) advantages.
Kilian Valkhof is running a series of articles called Understanding CSS Positioning of which the first part is now available. A good read before starting the conversion of your design into XHTML and CSS.