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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:07:33+00:00 2026-05-15T12:07:33+00:00

I have a button set, and would like to set the width of each

  • 0

I have a button set, and would like to set the width of each button so they can be the same size (i.e. if I have 4 buttons of 25% each of the element)

Basically the site has a table on the left, and within that table I have 4 options. The way it is right now is it’s not using 100% of the left column, so it looks bad. I’m looking to make the button set take 100% of the column, and each button to share 25% of the fixed space.

I’ve tried to .css(‘width’) each button element but it’s not making a difference.

My code looks like something like this:

 <script type='text/javascript'>
  $( function() { $("#task-sort").buttonset();   } );
 </script>

 <div id='task-sort'>
  <input type='radio' name='task-sort' id='sort_all' checked><label for='sort_all'>All</label>
  <input type='radio' name='task-sort' id='sort_inc'><label for='sort_inc'>Incomplete</label>
  <input type='radio' name='task-sort' id='sort_com'><label for='sort_com'>Completed</label>
 </div>
  • 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-15T12:07:34+00:00Added an answer on May 15, 2026 at 12:07 pm

    You can do it like this:

    $("#task-sort").buttonset().find('label').css('width', '25%');​​​​​​​​​​​​​​​​
    

    After .buttonset() your html looks like this:

    <div id="task-sort" class="ui-buttonset">
      <input type="radio" name="task-sort" id="sort_all" checked="" class="ui-helper-hidden-accessible">
      <label for="sort_all" class="ui-state-active ui-button ui-widget ui-state-default ui-button-text-only ui-corner-left" aria-pressed="true" role="button" aria-disabled="false"><span class="ui-button-text">All</span></label>
      <input type="radio" name="task-sort" id="sort_inc" class="ui-helper-hidden-accessible">
      <label for="sort_inc" aria-pressed="false" class="ui-button ui-widget ui-state-default ui-button-text-only" role="button" aria-disabled="false"><span class="ui-button-text">Incomplete</span></label>
      <input type="radio" name="task-sort" id="sort_com" class="ui-helper-hidden-accessible">
      <label for="sort_com" aria-pressed="false" class="ui-button ui-widget ui-state-default ui-button-text-only ui-corner-right" role="button" aria-disabled="false"><span class="ui-button-text">Completed</span></label>
     </div>
    

    Then you just need to set the width on those newly created <label> elements to get the effect you want, you can try out a demo here.

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

Sidebar

Related Questions

I would like to have a layout with 5 times 5 buttons. Each of
I have a button that I would like to disable when the form submits
I have a snippet to create a 'Like' button for our news site: <iframe
Here's the scenario: I have a set of buttons that I want to bind
I have a set of radio buttons where a selection is required. In addition,
I have a Button that is looking at 2 comboboxes to make sure they
I have a set of items that can be in various states. I want
What I would like to do is have the user add a new record
I would like to create a custom Button component with three labels: left-, center-,
I'm using Delphi XE and I would like to make a button which shows

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.