To make use of absolute positioning, you only need to specify position:relative
on elements that will contain children that use position:absolute
.
If your CSS you're specifying position:relative
all over the place for no good reason.
By specifying position:relative
, you are defining the origin point for the absolutely-positioned child elements.
So in your case, you should only be specifying position:relative
on the #headcontainer
element.
Also, because you are using floated elements ,#headcontainer is collapsing to zero height (add a border to it and you'll see). So be sure to clear your floated elements.