CSS posistioning help
# August 1, 2010 at 9:29 am
Created a template out of Photoshop with all Divs with absolute positioning. Need the footer to adjust and sit nicely below content and sidebar http://www.designcymru.com/help.jpg. Tried relative positioning but content ends up sitting beneath banner and sidebar beneath content. Looking for some help to figure this out please.# August 1, 2010 at 1:31 pm
Why absolute positioning? Doesn’t really make sense in this case, with such a simple layout.
The footer is doing exactly what you’ve asked it to do, be 990px from the top of it’s relative parent. If you provide a live link to the website, I’m sure we can provide a quicker solution.# August 1, 2010 at 1:51 pm
Hi thanks for the response. I am running wordpress locally before I upload it live, I’ve provided the CSS and layout in the image I posted, is there any way you can help me from there please? If you ‘need’ the site live I’ll upload it but ideally would like to keep it local.# August 3, 2010 at 1:17 pm
The problem is that your content and sidebar area is position absolutely. This takes it out of the natural flow of the document, so unless your content is the same height every single post, your footer will be in different places depending on the height of your content (since it’s dynamic, it’ll be longer or shorter depending on the post).
Instead of using absolute positioning, float your content left and float your sidebar right (or left too..that could work).
Then set your footer to clear your content/sidebar.
That will allow your footer to rest below your content.
The main downside to absolute positioning is the problem you’re facing – footer doesn’t go directly underneath the positioned content.
You must be logged in to reply to this topic.