Forums / Templates, Stylesheets, Page Layout / Vertically aligning divs on homepage

Vertically aligning divs on homepage

Locked

Views: 726

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
12 Apr 2010, 1:36 PM
#1
f7creative avatar

f7creative

New Zenner

Join Date:
Oct 2009
Posts:
4
Plugin Contributions:
0

Vertically aligning divs on homepage

I'm finding it impossible to vertically align the main area of my homepage, which is a javascript slideshow. This should sit vertically centred between the header and the footer (which is glued to the bottom of the browser window). I've tried several solutions that SHOULD work, but none do. I suspect this is probably due to the sticky footer but am not sure.
URL of my hompage at present is http:https://www.dillydaydream.com/store

Any help very much appreciated!

cheers

Karl

12 Apr 2010, 2:16 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Vertically aligning divs on homepage

Something like margin-top:7em; in #homeContent should work.

Also, your position:absolute in #navSuppWrapper is causing a serious problem in IE7.

12 Apr 2010, 2:36 PM
#3
f7creative avatar

f7creative

New Zenner

Join Date:
Oct 2009
Posts:
4
Plugin Contributions:
0

Re: Vertically aligning divs on homepage

Thanks Stevesh - I'll have to check it out in IE7 as I've been relying on feedback from someone else due to designing this on a Mac. Will drop a 7em top margin in and see if this fixes it - Thanks Again!

12 Apr 2010, 4:17 PM
#4
f7creative avatar

f7creative

New Zenner

Join Date:
Oct 2009
Posts:
4
Plugin Contributions:
0

Re: Vertically aligning divs on homepage

Tried the 7em top margin - it does help but what I'm really trying to do is get it to auto centre as the browser window grows - somebody with a bigger res monitor is going to have the footer way down and the middle area up near the header with a huge gap in between. I've tried messing about with absolute positioning, negative margins etc but no go :-(