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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:51:44+00:00 2026-05-25T09:51:44+00:00

I use jquery mobile to generate my buttons and I have a CSS code

  • 0

I use jquery mobile to generate my buttons and I have a CSS code below to change its design but no matter what value i put in width and height the size of the button doesn’t change, but it is relatively dependent on the font size of the label. How can I change this so I can change the button size irregardless of the font size of the label?

$("#ui-1").css({'position':'absolute','left':'27.0px','top':'51.0px','width':'120.0px','height':'30.0px',});
$("#ui-1 .ui-btn-text").css({'font-family':'"Calibri","Arial","Sans Serif"','font-size':'0.75em','color':'black','text-align':'left','wordwrap':'normal','text-shadow':'1px 1px 1px #FFFFFF'});
  • 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-25T09:51:44+00:00Added an answer on May 25, 2026 at 9:51 am

    Live Example:

    • http://jsfiddle.net/3EgrW/21/ (Width)
    • http://jsfiddle.net/3EgrW/35/ (Height)

    JS:

    // For all buttons use something like this
    $('.ui-btn').css('width','50%');
    
    // For individual buttons use something like this
    $('#theButton1').parent().css('width', '75%');
    
    // Or this for HREF data-role buttons
    $('#hrefButton4').css('width', '45%');
    

    UPDATE: (I think this is what you’re looking for)

    // this changes the height for all buttons
    $('.ui-btn-text').css('font-size','50px');
    
    // This changes the height for a single element 
    $('#hrefButton3').children().children().css('font-size','30px');
    

    HTML:

    <div data-role="page" id="home"> 
        <div data-role="content">
            <input type="button" id="theButton1" value="Press Me 1" />
            <input type="button" id="theButton2" value="Press Me 2" />
            <input type="button" id="theButton3" value="Press Me 3" />
            <input type="button" id="theButton4" value="Press Me 4" />
            <br />
            <a href="#" data-role="button" id="hrefButton1">HREF Me 1</a>
            <a href="#" data-role="button" id="hrefButton2">HREF Me 2</a>
            <a href="#" data-role="button" id="hrefButton3">HREF Me 3</a>
            <a href="#" data-role="button" id="hrefButton4">HREF Me 4</a>
        </div>
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Jquery Mobile controlgroup with two buttons: <div data-role=controlgroup data-type=horizontal class=headerMenu iconposSwitcher>
I have this <h1 id=coins></h1> But cant style it with css, when i use
I am new jquery mobile. i want to use showPageLoadingMsg() of jquery mobile.But it
Mobile browsers. Jquery dialog alert box. I don't want to use alert() because it
I use jQuery to do AJAX calls. But specialchars like ÆØÅ (danish letter) comes
I use jquery validation plugin and the remote attribute works with emailId but not
I use the following code to append a big dom on a mobile browser
I'm trying to use Jquery Mobile for a web-app, and depending on what button
I use jQuery, jQuery UI and jQuery mobile to build a web application for
I'm working on a web app, which I decided to use jQuery Mobile for

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.