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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:47:36+00:00 2026-05-19T02:47:36+00:00

What i want to is when somebody use y scroll even in that case

  • 0

What i want to is when somebody use y scroll even in that case the header (which contains days and dates should be visible.) Please check the screen shot

Something using position:fixed and z-index etc.

(example i have seen :– when u open stack-overflow and ur JavaScript is disabled, then in that case a red colored message will appear and keep appearing even if u scroll down the page.)

So What i want to do is:–

Initially at page load this row will the be in between the page (as there are lot of other things above and once user scroll down it should be visible to user ie this sticks with the top of the page)

  • 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-19T02:47:37+00:00Added an answer on May 19, 2026 at 2:47 am

    If I understand you correctly, you are looking for an element that is not located at the top of the page, but sticks to the top when you scroll down past it? This can be done with css and a little JavaScript magic (jQuery used for brevity):

    /* CSS - you should add width, height, padding as needed */
    #your_element { position:relative;}
    

    Your element will behave normally if JS is disabled. Otherwise, the following snippet makes it dynamic:

    win = $(window);
    element = $('#your_element');
    
    if (element.length) {                // <-- Make sure element exists
        win.scroll(function () {         // <-- When scrolling do the following
            if (win.scrollTop() > 100) { // <-- Adjust number.  Explanation to follow
                element.css({'position':'fixed', 'top':'0px'});
            } else {
                element.css({'position':'relative', 'top':'auto'});
            }
        });
    }
    

    Now you just have to adjust the value 100 to equal the distance between the top of the page and the top of your element. So, if your element is 250px from the top, you would use 250. If you are not sure you can play around with it until you get something that looks smooth.

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

Sidebar

Related Questions

I´m developing a very memory-consuming app and want to use the largeHeap-Tag, which should
My problem is that I want to use Java to implement an application which
I have a simple use case to solve. Imagine that somebody tells you hey,
Can somebody please help me, I want to put the OK symbol throw HTML
I want to know that is boost::asio::deadline_timer thread safe? Can somebody answer me?
I want to use Ninject in a project which combines ASP.Net webforms and ASP.Net
I want extend class which have final constructor (in my case it's SimpleXMLElement), but
Can somebody help me, I want to use in jQuery something like ScrollTo. When
Imagine that I want to access somebody's emails using YQL: I get consumer key
It would be glad if somebody could give me advice which techniques I should

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.