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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T19:13:47+00:00 2026-06-07T19:13:47+00:00

A very basic setup: title-shim-container . The shim ensures, that on page load, the

  • 0

A very basic setup: title-shim-container. The shim ensures, that on page load, the container is kept at bottom of window to make room for a video live-stream in the background.

When the container is scrolled up and hits the title, the title shall be pushed off screen and drop down in its original position. The container is positioned relative by the jQuery Isotope plugin; that can’t be changed.

The first part I got in this fiddle here. But how to get the second part working? I got only this far 🙁

jQuery.event.add(window, "load", shimming);
jQuery.event.add(window, "resize", shimming);
    
function shimming() {
    var wheight = $(window).height();
    $('#shim').css('height', (wheight - 63));
} // this part up to here works

$(window).bind("load resize scroll", function () {
    var wheight = $(window).height();
    console.log(wheight);
    var wscrolled = $(window).scrollTop();
    console.log(wscrolled);

I asked for this in previous posts without providing a fiddle, so I better delete those posts?

Thanks for advice…

  • 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-07T19:13:50+00:00Added an answer on June 7, 2026 at 7:13 pm

    It took me a second to figure out what you were asking. The comments in the fiddle were actually more useful than your question here, but I think this captures what you were going for:

    if (wscrolled > wheight - 187) {
        $('#title').css('position', 'absolute');
        $('#title').css('top', (wheight - 123));
    } else if (wscrolled <= wheight - 187) {
        $('#title').css('position', 'fixed');
        $('#title').css('top', 64);
    }
    

    The 187 comes from the combined height and margin of the tile along with the gap space left over by the shim. The 123 is the height of the title and the gap space to keep everything lined up correctly.

    — Edited —

    It occurs to me that it’s worth adding an else if condition to prevent repeatedly setting the existing setting if there will be a lot of scrolling going on.

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

Sidebar

Related Questions

I'm trying to setup a very basic html5 page that loads a .mp4 video
On my site I have a very basic setup: an 'a href' tag that
I have a very basic JNA test setup that I want to use to
So I have this very basic socket.io setup that you have probably seen a
I'm trying to create a very basic Setup and Deployment project using Visual Studio.
I have a very basic sign up and log in setup running and all
So I'm looking at setting up MySQL Replication in a very basic master/slave setup.
I'm trying to setup a very basic jQuery image gallery. You can see my
I fear that I miss a very basic point, but I'm stuck at the
I assume that the basic setup for ASP.net web development today is: Windows Vista

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.