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

The Archive Base Latest Questions

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

Is there a way to define the offset JQM uses for selectmenu overlay? Other

  • 0

Is there a way to define the offset JQM uses for selectmenu overlay?

Other options can be set via prototyping like this:

$.mobile.page.prototype.options.addBackBtn   = true;
$.mobile.page.prototype.options.backBtnTheme = "a";

Problem description

jQuery Mobile determines the size of the screen and decides how to display the overlay for select menus. Unfortunately this seems to work only without using a fixed header toolbar, because JQM is generation the source over here always with the top-offset of 30px style="left: 741.65px; top: 30px;.

There is no ways to overwrite this with CSS only, because the specificity of the css rules are always lower than the ones of an style-attribute!

I don’t want to change the JQM sourcecode, because I’d have to change it again with every release. And I don’t use the uncompressed sources.

Generated source from JQM

<div class="ui-selectmenu ui-overlay-shadow ui-corner-all ui-body-a pop in"
     style="left: 741.65px; top: 30px;">

Sample

http://jsfiddle.net/V8AAB/

JQM Source code

This is the corresponding code from jQuery Mobile 1.0RC2:

self.menuType = "overlay";

self.screen.height( $(document).height() ).removeClass( "ui-screen-hidden" );

// Try and center the overlay over the button
var roomtop = btnOffset - scrollTop,
    roombot = scrollTop + screenHeight - btnOffset,
    halfheight = menuHeight / 2,
    maxwidth = parseFloat( self.list.parent().css( "max-width" ) ),
    newtop, newleft;

if ( roomtop > menuHeight / 2 && roombot > menuHeight / 2 ) {
    newtop = btnOffset + ( self.button.outerHeight() / 2 ) - halfheight;
} else {
    // 30px tolerance off the edges
    newtop = roomtop > roombot ? scrollTop + screenHeight - menuHeight - 30 : scrollTop + 30;
}
  • 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-26T10:04:47+00:00Added an answer on May 26, 2026 at 10:04 am

    Suggested Fix:

    .ui-selectmenu { z-index: 1100 !important; } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to define the weekly period I would like to use
Is there any way to define a variable that can be used in multiple
Is there some way I can define String[int] to avoid using String.CharAt(int) ?
Is there a way to define 31 buttons in one action.. Something like this
Is there a way to define regions in CSS file just like regions in
Is there a way to define the timezone for an application in ASP.NET such
Is there a way to define styles for a combination of classes? For example,
Is there any way to define an IDE Layout in visual studio 2008? Lets
Is there a way to define an enum in AS3 in a way we
Question Is there a way to define a method only once in C# (in

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.