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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:27:04+00:00 2026-05-26T17:27:04+00:00

Been banging my head against this one for a while… <div id=pager style=top: 5px;

  • 0

Been banging my head against this one for a while…

<div id="pager" style="top: 5px; position: relative; " class="pager" >
    <form>
        <img src="http://tablesorter.com/addons/pager/icons/first.png" alt="first" class="first"/>
        <img src="http://tablesorter.com/addons/pager/icons/prev.png" alt="prev" class="prev"/>
        <input type="text" class="pagedisplay"/>
        <img src="http://tablesorter.com/addons/pager/icons/next.png" alt="next" class="next"/>
        <img src="http://tablesorter.com/addons/pager/icons/last.png" alt="last" class="last"/>
        <select class="pagesize">
            <option selected="selected" value="10">10</option>
            <option value="20">20</option>
            <option value="30">30</option>
            <option value="40">40</option>
            <option value="50">50</option>
        </select>
    </form>
</div>

When I actually load up the page and do a quick View Source, here’s what I see:

<div id="pager" style="top: 494px; position: absolute; " class="pager">

The table itself has nothing special, though it does fall under <div id="main">

<table id="runResults" class="tablesorter">

The CSS:

 table 
{
  border: solid 1px #000000;
  border-collapse: collapse;
}

table td 
{
  padding: 5px;   
  border: solid 1px #000000;
}

table th
{
  padding: 6px 5px;
  text-align: left;
  background-color: #e8eef4; 
  border: solid 1px #000000;   
}

Pager is not defined in my CSS, nor are any div elements in general.

This is just a pagination plugin for a table on my site, and it’s rather annoying because obviously the number of entries is not always an integer multiple of 10… meaning that the positioning of the pager goes way off the page when there are only 1 or 2 overflow entries.

How do I make the pager div actually position itself relative to the table?

EDIT: Whenever I select the various options in “pagesize”, the table resizes properly and the div follows as appropriate… if I navigate to the last page (with 2 overflow entries) and then resize, the div goes to the right position but when I change pages without resizing, the div stays where it was and thus it shows up near the top of the table.

EDIT2: I decided to dig around in the jQuery pager plugin I was using, since my own code seemed to be fine. Here’s what I found:

function fixPosition(table) {
            var c = table.config;
            if (!c.pagerPositionSet && c.positionFixed) {
                var c = table.config, o = $(table);
                if (o.offset) {
                    c.container.css({
                        top: o.offset().top + o.height() + 'px',
                        position: 'absolute'
                    });
                }
                c.pagerPositionSet = true;
            }
        }

Turns out the jQuery was forcing the div’s container to a specific position. All I had to do was change

top: o.offset().top + o.height() + 'px',
position: 'absolute'

to

top: '5px',
position: 'relative'
  • 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-26T17:27:05+00:00Added an answer on May 26, 2026 at 5:27 pm

    Sounds to me like some Javascript is running and making changes to your page. If you disable javascript, reload your page and view source – o you see your version of the HTML. If so, you ‘just’ need to track down the javascript 😉

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

Sidebar

Related Questions

I've been banging my head against for wall for a while with this one.
Been banging my head against this one for a while, and figured I'd turn
I have been banging my head against this one for a while now and
been banging my head against this one for a while. For a CSS redesign
I've been banging my head against a wall on this one. I'm working on
I've been banging my head against a wall for sometime on this one. I'm
I've been banging my head against the wall with this one, may be someone
Ok I've been banging my head against this one so long, I think I've
I've been banging my head against the wall on this one. I have a
I have been banging my head against this for a little while now. I

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.