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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:55:20+00:00 2026-05-21T03:55:20+00:00

I am fighting this thing and cannot figure it out… can someone please help.

  • 0

I am fighting this thing and cannot figure it out… can someone please help.

I want to find the last DIV in the BODY that:
A) Is NOT a specified ID (the easy part); and
B) Does NOT have fixed positioning (the part that’s killing me)

Basically, I am looking for the last DIV in the BODY that’s part of the flow, so I can add a bit of margin-bottom.

this is where I am at so far:

$(theBody).children('div').not('#toolbar').not(':fixed').find(':last');

$.expr[':'].fixed = function(obj, index, meta, stack){
    if ($(obj).css('position')=='fixed') {
        return true;
    } else {
        return false;
    }
};

it’s not working, and I think the custom selector is overthinking it…. I just dunno how to work it in there.

Thanks in advance, folks!

  • 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-21T03:55:21+00:00Added an answer on May 21, 2026 at 3:55 am

    First thing you need to do is define the custom selector above the code where you use it 🙂

    The selector I believe you want is…

    $('body > div:fixed:not(#toolbar):last')
    

    jsFiddle.

    I also provided a terser custom selector…

    $.expr[':'].fixed = function(obj){
       return $(obj).css('position') == 'fixed';
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok well I have been fighting with this for a while now and have
Okay, I hate facebook now. I've been fighting with this far too long. I'm
Okay still fighting with doing some SqlCacheDependecy in my Asp.net MVC application I got
We've been fighting with HAProxy for a few days now in Amazon EC2; the
I'm fighting here with System.Printing namespace of .net framework. And what i always saw
I have fighting to get a IN parameter to work inside of a LIKE
I am fighting with focus management of WebView: WebView messes with focus management of
I'm writing a fairly simple 2D multiplayer-over-network game. Right now, I find it nearly
I am trying to change the text color of the ListView but I cant
I have a limited set of objects (20 - 30) which I need to

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.