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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:39:57+00:00 2026-06-11T03:39:57+00:00

I want to achieve following layout using javascript/jquery and css. I have a project

  • 0

I want to achieve following layout using javascript/jquery and css. I have a project written with jquery mobile. As intended there is header, content and footer. My footer has nothing inside and floats on the bottom of the page. My content is a form which is dynamic with a next button at the bottom to submit it. On submitting I get a different form with the button. The button is always below to the right of the form.

Depending on the content inside the form the button should float below the form and align right. If the form has small content and does not cover the screen the button should drop above the footer and align right. If the content in the form is more that the screen size the button should stick below the form contents.

I tried using jquery method to get the size of the screen and over css setting to the button but this gives it a fixed attribute and does not change if I change the screen.

  var innerHeight = $('#contents').height();
  alert(innerHeight);
  var screenHeight = window.innerHeight;
  alert(screenHeight);
  if(innerHeight < screenHeight) {
    $('#contents').css("height", screenHeight-120);
  }

I want this to be dynamic so that if viewed in mobile it would render properly on landscape and portrait. Thank you for all the suggestions.

  • 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-11T03:39:58+00:00Added an answer on June 11, 2026 at 3:39 am

    Sounds like you’re looking for a sticky footer for that button: http://www.cssstickyfooter.com/

    Be sure to pad the sticky footer at least the height of that fixed position footer element you mention in your post (this would ensure your button is never hidden).

    Note: You may want to rethink your user-experience in this design.
    The position of the ‘submit/next’ button should be intuitive, and consistent.

    For example: Form #1 has that button just a couple pixels away from the input fields; Form #2 has that button 100px below the inputs. To me, that’s bad design. It’s a form — a tool that users will expect to behave a certain way. I believe ‘playing’ with the location of the submit button is a bad idea — unless it has a very specific location throughout the form submission process.

    Maybe a sticky footer combined with balancing your input count between pages would give you the best of both ‘wants’ and ‘needs’

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

Sidebar

Related Questions

I want to add button to following header. It should have layout like http://www.fullstopinteractive.com/
I have a gridview with couple of columns,I want to achieve the following: If
I want to be able to achieve the following using guice/gin: Get all sort
Is there a way to achieve the following in Maven? I want to exclude
I want to use a scripting language(Javascript, PHP) to achieve the following task. 1)I
I want to achieve the following xml using simple xml framework ( http://simple.sourceforge.net/ ):
I want to achieve wrap text in android. I am using following attributes but
I want to achieve following layout: with following code: <div class=m> <div class=l></div> <div
I have the following repository layout: master branch (production) integration working What I want
I am using Nlog in my MVC project What I want to achieve is

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.