html - CSS/JavaScript: Liquid Design issue -


i'm trying make website similar one. on website use javascript change padding on first section keep in windows viewport. have done this, have issue making button move way theirs move when window size changed.

see video below, when make height smaller (to extent) button should move up, on copy doesn't can't figure out how have done it. video below shows css code , html , no values seem changes javascript make button move, does, padding of element doesn't change 96.

youtube video

edit: code far, html:

<body>     <div class="container">         <section id="header" class="arrows" style="padding:280px 0px">             <header>                 <h1>mobile paint solutions</h1>                 <p>since 1980</p>             </header>             <footer>                 <a onclick="test()" href="" class="button white">about</a>             </footer>         </section>         <section id="banner" class="arrows">             <header>                 <div>                     <h1>about us</h1>                     <p>we proud company , have been providing superb service many years. may read of our reviews or sumbmit own below! </p>                 </div>             </header>             <footer>                 <a href="#banner" class="button white">about</a>             </footer>         </section>     </div> </body> 

css #header:

body {         text-align:center;         font-family:'source sans pro', sans-serif;         letter-spacing: 1px;         background-image:url(images/bg.jpg);         padding:0px;         margin:0px;     }     header { margin-bottom: 1em; }     * {          margin:0;          padding: 0;         border: 0;         font-size: 100%;         font: inherit;         vertical-align: baseline;     }     *:before, *:after {         box-sizing: border-box;     }      /* header , title styles */     #header {         display:inline-block;         text-transform:uppercase;         color:#fff;         cursor:default;         text-align: center;     }     #header header p:before {         content: '';         display: block;         border-top: solid 1px rgba(255, 255, 255, 0.5);         margin: 4px 0 0.8em 0;     }     #header header p {         border-top:solid 1px rgba(255, 255, 255, 0.5);         letter-spacing:3px;         text-transform:uppercase;         font-size:1em;         margin-top:1em;      }     #header h1 {         font-size:2.5em;         font-weight:bold;         letter-spacing:3px;     } 

here link website can see work.

fixed issue, seem footer needed positioned absolute, changed around other code example positioned header relative, seemed start work.


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -