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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:02:24+00:00 2026-05-27T09:02:24+00:00

The form I am creating for a mobile website shows new fields based on

  • 0

The form I am creating for a mobile website shows new fields based on previous selections. i.e. – a user selects and option from a dropdown menu (a date) and then a series of times shows up based on the day selected. The times are not showing until the day is selected.

I have a spinning loading div while the times are loaded in the background via ajax. The problem I am having is that the loading div sits at the top of the page when the ‘action’ is taking place about three-quarters of the way down. This ‘action’ part is in the viewport (it’s a mobile website) and the loading div is at the top of the page – which is far above the users viewport.

How can I bring the loading div down so that it’s always in the current viewport? How can I make the loading div follow the place in the form where the user currently is taking into account scrollbars?

I have been trying to use the vertically centred html/CSS model as described here:
http://www.jakpsatweb.cz/css/css-vertical-center-solution.html

But it is not working and the centre of the page doesn’t seem to update at each event when a form element is clicked. I think I need to use the focus or blur event for the form field to update this and reassess, but I don’t seem to be able to get it working.

Does anyone have any tips on how to move the loading div to the centre of the current viewport area each time the page increases in length?

  • 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-27T09:02:25+00:00Added an answer on May 27, 2026 at 9:02 am

    If your loading div is designed to be inside the document flow – e.g. a new content block inside the form – it’s best to use jQuery to insert the loading div inside the content itself. It will be very difficult to position it pixel-perfect otherwise.

    If the loading div is to appear as an overlay to the document then you can use fixed CSS positioning with a high z-index. To center it on all screen resolutions use jQuery and the formula (window.height() - div.height())/2 as the top pixel position. The code will be similar to this answer.

    Hope that helps

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

Sidebar

Related Questions

So within my application is a form for creating a new user, with relevant
I am creating a form dynamically from the fields returned from server using json
I have a form for creating a new user. I'd like to pass a
I've created my own signup form and creating the user using the Membership class.
I am creating a form in HTML that will be printed, with fields that
I am creating a form where a user will register with a struts2 application.
The mailing list form I am creating has the following fields: first name, last
I have a form for creating a new account and it has a password
Can anyone suggest me some reading for creating Form based editor in Eclipse?
I want creating form field hints where the default value shows 'Password' and on

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.