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 7862757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:16:07+00:00 2026-06-02T23:16:07+00:00

Possible Duplicate: How to keep the header static, always on top while scrolling? I

  • 0

Possible Duplicate:
How to keep the header static, always on top while scrolling?

I want to keep the header section of the web site always on top while scrolling down the page.
how can i do with CSS ? or do I have to use Jquery ?

  • 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-06-02T23:16:09+00:00Added an answer on June 2, 2026 at 11:16 pm

    Here is the DEMO

    Html IS:

    <div id="header" class="fixed" style="display: block; top: 0px; ">
            <div class="inner">
            <!-- .inner -->
            </div>
            <div class="shadow" style="display:block;"><span></span></div>
    </div>
    
    <div style="height:600px;"><a href="http://imgur.com/k9hz3"><img src="http://i.imgur.com/k9hz3.jpg" title="Hosted by imgur.com" alt="" /></a></div> 
    <div style="height:600px;"><a href="http://imgur.com/TXuFQ"><img src="http://i.imgur.com/TXuFQ.jpg" title="Hosted by imgur.com" alt="" /></a></div> ​
    

    Css is:

     #header{height: 48px;width: 100%;z-index: 1000;}
    
    .fixed {background: url(http://static.tumblr.com/njty47g/Omoleufdi/topbar_bg.png) left top repeat-x;
    position: fixed;left: 0;
    -webkit-box-shadow: 0 7px 8px rgba(0, 0, 0, 0.12);
    -moz-box-shadow: 0 7px 8px rgba(0, 0, 0, 0.12);
    box-shadow: 0 7px 8px rgba(0, 0, 0, 0.12);}
    
    .inner {width: 940px;margin: 0 auto;height: 48px;}
    
    
    .shadow{width: 100%;height: 5px;position: absolute;left: 0;bottom: -5px;z-index: 500;display: none;}
    ​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: How does uʍop-ǝpısdn text work? How to make the text upside down
Possible Duplicate: How to keep SVN from updating a directory already in repository everybody!
Possible Duplicate: What does it mean to “program to an interface”? I keep coming
Possible Duplicate: How to keep the browser history in sync when using Ajax? I
Possible Duplicate: Mouseout on specified divs and keep original div open I asked a
Possible Duplicate: splash screen for Universal application for ipad and iphone How to keep
Possible Duplicate: Python dictionary, keep keys/values in same order as declared If I have
Possible Duplicate: Javascript templating engines? I keep on stumbling upon javascript templating engines and
Possible Duplicate: How to use UTF-8 in resource properties with ResourceBundle I want to
Possible Duplicate: Protect .NET code from reverse engineering? I want to make my software

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.