I have basic knowledge of javascript and jquery . I want to implement design like Sevenly which is like a page/div is move over another but I don’t know how to start with that . Let me know if anyone has as idea on how to implement this ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If the first container has a specific height, then I think the most straight forward solution would be to fix the first container (
position:fixed). Then you add amargin-topto the rest to push the rest down so it starts just below the first container:HTML:
CSS:
The
position:absolute;is for browsers that don’t support fixed. Making it absolute will causes it to behave like fixed, except that it scrolls along with the rest of the page. Theposition:relative;on the rest is because of z-stacking.fixed-ing the header container causes it to be put in it’s own layer on top of everything else; setting the rest torelativeputs the rest on top of the header again.See jsfiddle demo here.
If you don’t have a specific height on the header, then you will probably need to use javascript.