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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:56:21+00:00 2026-06-05T10:56:21+00:00

HTML markup is as follows: <button id=Refresh><img src=refresh.png /></button> I am creating this button

  • 0

HTML markup is as follows:

<button id="Refresh"><img src="refresh.png" /></button>

I am creating this button as a jquery ui button with the following code:

$("#Refresh").button();

Calling this function produces the following markup:

<button id="Refresh" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button" aria-disabled="false">
    <span class="ui-button-text">
        <img src="refresh.png">
    </span>
</button>

This works fine. The result is a button with padding of .4em 1em; as defined in jquery’s CSS. (.ui-button-text-only .ui-button-text)

I have several buttons on this page, and I like this padding for most of them. However, for this one button in particular I’d like to have no padding. I realize I could just change the CSS for .ui-button-text-only and .ui-button-text but that would screw up the other buttons using this style, and I like them the way they are.

So I’m wondering if there’s any way to override this css just for one button. I took a look at jquery’s button docs but it doesn’t appear to allow passing of specific CSS in with the button options.

Thanks in advance for the help!

  • 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-05T10:56:23+00:00Added an answer on June 5, 2026 at 10:56 am

    You can just add a new class to the span within the button after it is created.

    $("#Refresh").button();
    $("#Refresh").find('span.ui-button-text').addClass('yourClass');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have following Jquery $j(a#Pinterest).html(<img src='/images/Social Media/pinterest.png'>); And mark up is as follows
Suppose I have this html markup: <div id=wrapper> <pre class=highlight> $(function(){ // hide all
I can select (using jQuery) all the divs in a HTML markup as follows:
My HTML markup looks like that <html> <body> <div id=loading><img src=core/design/img/load/load.gif /></div> <div id=wrap></div>
suppose I have a html markup like this: <div> <p> this is the parent
I have following html markup, bit more than demo here with mixture of li/ul
Suppose a HTML markup like this: <ul> <li>List item 1</li> <li>List item 2</li> <li>List
I have the following html markup: <div class=wrap_select> <span class=select id=selectdateRange>Today, 25 March, Sun</span>
I have the following HTML markup:- <select name=List1 id=l1> <option>One</option> <option>Two</option> <option>Three</option> <option>Four</option> <option>Five</option>
I have the following HTML markup: <select name=Fault class=textbox id=fault> <option>Single Light Out</option> <option>Light

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.