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

  • Home
  • SEARCH
  • 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 7507081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T22:24:50+00:00 2026-05-29T22:24:50+00:00

I’m developing a custom theme, based on PageBuilder2 (csa2.theme) for WebSphere Portal 7. I’m

  • 0

I’m developing a custom theme, based on PageBuilder2 (csa2.theme) for WebSphere Portal 7. I’m using JQuery 1.7.1.
One of the requirements is to have a footer(id is div#footer) and a help bar(class is div.footer.flotante) that lies just at top of footer while footer is in viewport, but it needs to float at bottom of window while footer is not in viewport… kinda Facebook new timeline toolbar (add to friends, etc) or Mashable social widget, only that from bottom.

Scheme of what I want to do

The following is a snippet of what I’ve done with JQuery to get this:

$(window).scroll(function (event) {
    var barra = $('div.footer.flotante');
    var offset = barra.offset();
    var bh = barra.height();
    var h =  offset.top;
    var wh = $(window).height();

    var dh = $(document).height();
    var y = $(this).scrollTop();
    var x = dh - y - wh;
    var hf = $("div#footer").height();

    if (x > hf) {
        barra.addClass('fixed');
    } else {
        barra.removeClass('fixed');
    }
});

These are CSS styles I’m using:

div.footer.flotante{
    background:url(../images/footerone.png) repeat-x;
    width:100%;
}
div.footer.flotante.fixed{
    position: fixed;
    bottom: 0px;
    z-index: 1;
}

With that code I got to float my toolbar in case of a html page with static content (therefore value of dh is constant). My problem is that being this a theme development, is expected to have content loaded dynamically to body of document, increasing dh value to an unknown amount of pixels. In this scenario the calculation for value of x is taking the initial value of dh, giving as a result a mispositioned floating toolbar.

  1. How could I recalculate value of dh after render that content?
  2. Given that there is no such a property called offset().bottom, is there a way to temporarily “flip upside-down” document in order to calculate offset().top value for my toolbar thus eliminating the need to know final value of dh?
  3. Have you another suggestion to do what I’m trying?

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-29T22:24:51+00:00Added an answer on May 29, 2026 at 10:24 pm

    I found the cause of the problem: it was an absolute positioned image for a logo which had a negative bottom attribute, thus creating an extra vertical spacing below the footer and increasing dh value.

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

Sidebar

Related Questions

I am reading a book about Javascript and jQuery and using one of the
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have thousands of HTML files to process using Groovy/Java and I need to
I'm making a simple page using Google Maps API 3. My first. One marker
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into

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.