Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6797003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:33:20+00:00 2026-05-26T18:33:20+00:00

i would like to create a single page where: 1) The top, 100px, fixed

  • 0

i would like to create a single page where:

1) The top, 100px, fixed
2) The bottom, 100px, fixed
3) Between top and bottom there is dynamic content

I was able to create exactly that but i have an issue, when i am scrolling the dynamic content, the elements go under and over the top and bottom and the same elements are visible thru the fixed top/bottom.

I tried clear: both; on the top and bottom div, but since they are fixed, the clear: both; did’nt works.

I would like to keep the dynamics elements inside the content div between top and bottom and if possible still use the main document scroll bar to scroll inside it.

Here is an example, assume the lines represent the top and bottom fixed div, and the ‘element’ are the dynamic contents.

element – not correct


element – not correct


element

element

element

element

element


element – not correct


element – not correct

Hope i am clear enough and thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:33:20+00:00Added an answer on May 26, 2026 at 6:33 pm

    I guess this is what you’re looking for.

    See this fiddle.

    HTML

    <header>
        This is the header!
    </header>
    <article>
        <p>Goodness one unimaginative rooster some that circa much jay goodness gosh pessimistic scantly dark some modest gasped where unexplainable some before about that a hello firefly macaw ethereally indecisive panda lorikeet where a peskily jellyfish a since lied factiously in and that after but falteringly so worm flabbily yet hey gladly more versus much precarious because a the boisterous quiet fed one alas hawk flawlessly thanks some.</p>
        <p>Squirrel much krill regarding before contrary jeez outdid warthog immaturely articulately valiant hey suggestive thus far won darn wow scorpion portentously more hotly miraculous jeepers meagerly since excluding that however pinched yet whale adoringly floppy tenably wow and after via for unproductively as one prior the more on urchin rang much because some more approving near oh a as far lion some lucky far much frog far and beneath underlay far after nosy jaguar subconscious after this far input frequently distant the much positively gagged jeez unobtrusively far sank less before babbled far by when this the this sensible outside.</p>
        <p>That far qualitatively intrepid vulture a ferret disgraceful moaned therefore easy much and curt insincerely dachshund notwithstanding yikes and dragonfly and patted until much jeez close fumed divisive copiously wherever near near far perceptible shrewdly ground yikes opened as elaborate adversely spilled that creepy imaginative by in hello groundhog magnificently jeez hence crud versus desperately caterpillar checked one wicked far some yikes.</p>
        <p>And darn dependent that urchin upon much jeez ably sniffed a less in far darn far incorrect between inept caterpillar man-of-war manta hence ironically into more amenable negative sanctimoniously tortoise eagle far spoiled clapped tepid yikes irresistibly testy warthog hugged immense much immense alas thus paid therefore agitatedly about well following the hey aboard and that after and condescending seagull because alas slept hey this went dove far much far considering raccoon witless under ungraceful.</p>
        <p>Emptied much gosh circuitously inside along a far pointed fanatic hey bravely with far yikes capybara meadowlark sedulous some lion squid floated darn drolly underwrote loving spat maliciously coaxing unwilling goodness seagull elephant snickered balked sloth for kookaburra inside untactfully so the where much human then because pungently cracked heard overtook firm skeptically reverently much some jeez less and hey towards.</p>
    </article>
    <footer>
        This is the footer!
    </footer>
    

    CSS

    body {
        font-family: sans-serif;
    }
    
    header, footer {
        position: fixed;
        height: 100px;
        text-align: center;
        width: 100%;
        background: #ff0450;
        color: #fff;
        text-transform: uppercase;
        line-height: 6em;
    }
    
    header {
        top: 0;
    }
    
    footer {
        bottom: 0;
    }
    
    article {
        margin: 100px 50px 0;
    }
    
    article p {
        margin: 20px 0;
    }
    
    article p:first-line {
        font-variant: small-caps;
    }
    

    Update

    body {
        font-family: sans-serif;
    }
    
    header, footer {
        position: fixed;
        height: 100px;
        text-align: center;
        width: 100%;
        background: #ff0450;
        color: #fff;
        text-transform: uppercase;
        line-height: 6em;
    }
    
    header:before {
        content: "";
        position: absolute;
        height: 20px;
        background: #fff;
        z-index: 999;
        top: -20px;
        width: 100%;
        left: 0;
    }
    
    footer:before {
        content: "";
        position: absolute;
        height: 20px;
        background: #fff;
        z-index: 999;
        bottom: -20px;
        width: 100%;
        left: 0;
    }
    
    header {
        top: 0;
        margin-top: 20px;
    }
    
    footer {
        bottom: 0;
        margin-bottom: 20px;
    }
    
    article {
        margin: 120px 50px 0;
    }
    
    article p {
        margin: 20px 0;
    }
    
    article p:first-line {
        font-variant: small-caps;
    }
    

    Updated the fiddle too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Xerces-c in my project, and would like to create a single
I would like to create a single function to automate htmlwireups. Some portions of
I would like very much to create a web page which would have the
I would like to create a single .war that contains both a web based
I would like to create a single-choice dialog form ( similar to what you
I would like to create a System Health web page which will monitor the
I would like to create a page that contains just a textarea and placeholder
I would like to create a page in panorama in WP7, using wrap panel
I would like create my own collection that has all the attributes of python
I would like create a web service in ASP.Net 2.0 that will supports JSON.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.