mjc
mjc

Reputation: 3426

jQuery UI buttons and anchor tags

If you look at the buttons demo page, you'll see that the anchor tag is slightly different in size than the other two (at least in chrome). This is due to the default styles applied by the browser.

See: http://jqueryui.com/demos/button/

Is there any quick and easy fix to make 'anchor buttons' look exactly like normal buttons?

Upvotes: 3

Views: 3683

Answers (1)

leppert
leppert

Reputation: 805

If you modify or override (recommended) the vertical padding on line 18 of jquery.ui.button.css you should be able to fix it. Here's the current block:

.ui-button-text-only .ui-button-text {
    padding: 0.4em 1em;
}

Here's a potential fix:

.ui-button-text-only .ui-button-text {
    padding: 0.3em 1em;
}

Only tested it in the Webkit nightly so you'll want to run it through other browsers to verify.

Upvotes: 4

Related Questions