I have a page at http://dot.kr/joon/205menu/menu/.
The page has the centerBox in GREEN at the position of vertically middle and horizontally center of the browser.
I like to put the centerBox in GREEN at the position of vertically middle between the sticky header in RED and the sticky footer in YELLOW.
How can I put it at the position of vertically middle between the sticky header in RED and the sticky footer in YELLOW instead of the position of vertically middle of the browser?
because the header and footer are sticky ( absolutely positioned) they do not figure into the flow ( in another words, their dimensions are not calculated into anything). for you to achieve what you want you will need to do the math manually.
to the style of the green box, recalculate the vertical position + ( (1/2 height of the header-1/2 height of the footer).
Hello, I am zilong from Korea.
(I was born in China but am working in Korea at the moment with dotJoon who is a member of this forum.)
My English is really very poor.
For the time being. dotJoon will help me in English.
Actually he already helped me in some posts using his name.
I like to put the centerBox in yellow backgound to the vertically middle position
between the sticky header and the sticky footer
Although dotJoon is helping me in English for this posting, I like to post with my English next time or later.
I hope you help me.
Thank you very much in Advance.
But the upper part of the yellow centerBox is hidden by the sticky header instead vertically middle aligned between the sticky header and the sticky footer.
What’s wrong in my code at http://dot.kr/joon/208exit/index.php?
You left out the top and bottom padding that you had in your other design which is needed to keep the content away from your fixed header and footer. You also missed out the html and body 100% rules to enable the table to be 100% tall.