captain
asked on
DIV does not centre on page
I have recreated our website for test purposes but have a DIV issue.
The site consists of header, flash, content and bottom section (in that order). The header section does not centre on page despite CSS margin:auto. All others do, pulling hair out for a few days.
Checked all DIVs, cannot see the obvious error..
Site is here
{have coloured header pink to highlight it
As you can see it pushes to the left.
Any help would be appreciated to save balding cranium.
thx
capt.
The site consists of header, flash, content and bottom section (in that order). The header section does not centre on page despite CSS margin:auto. All others do, pulling hair out for a few days.
Checked all DIVs, cannot see the obvious error..
Site is here
{have coloured header pink to highlight it
As you can see it pushes to the left.
Any help would be appreciated to save balding cranium.
thx
capt.
ASKER
thx, Cd&
Hm, that makes sort of sense but the DIVs contained within do not work either.
I have removed the position statement for the header entirely.
The Logos and phone number using absolute but hang off the left side too.
How can I have a fixed DIV at the top to allow the navigation to always stay on top whilst the content scrolls up?
Hm, that makes sort of sense but the DIVs contained within do not work either.
I have removed the position statement for the header entirely.
The Logos and phone number using absolute but hang off the left side too.
How can I have a fixed DIV at the top to allow the navigation to always stay on top whilst the content scrolls up?
ASKER
It is almost as if the DIV #wrapper is ignored, I also should not need margin:auto for every container in the wrapper either...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Also I would give the outer wrapper a high z-index like 30 or 40 so the scrolled content stays under it, and it may be necessary to use a z-index of -1 on the flash.
Cd&
Cd&
Oh and the disclaimer... You are using spry, and spry has a history of overriding styling and screwing up all attempts to get creative.
Cd&
Cd&
ASKER
Thanks again Cd&, will play with this later.
ASKER
Ok, have played for a while and used a similar technique than you described.
Not the #wrapper is set to fixed but a new container #top which holds the #header.
Now all elements seem to hang correctly and the site centres, bar the bottom.
I am sure this is to do with the relative positioning of the container but cannot quite get there.
Any ideas?
Not the #wrapper is set to fixed but a new container #top which holds the #header.
Now all elements seem to hang correctly and the site centres, bar the bottom.
I am sure this is to do with the relative positioning of the container but cannot quite get there.
Any ideas?
I don't understand. What is still not correct? It looks about the way I expect when I look at it in firefox.
Cd&
Cd&
ASKER
Hi Cd&
Sorry, I had continued to work on this and the file got updated. I replaced column layout positions with floats and all came to life
Thanks for looking though.
Sorry, I had continued to work on this and the file got updated. I replaced column layout positions with floats and all came to life
Thanks for looking though.
ASKER
Thanks
All good lizards deserve help when the wander into a tech area. :^)
Cd&
Cd&
Cd&