Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove jQuery UI Dialog Button border/outline

Which class do I need to modify/change to remove the outline of a JQuery UI Dialog Button. I can't seem to figure out which class is applying the border/outline around the 'X' button. The outline goes away when I click on the button.

I'm using this CSS: http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/smoothness/jquery-ui.css

like image 890
Ford Avatar asked Dec 21 '22 05:12

Ford


2 Answers

I solved my own question. Turns out that outline-color doesn't have a transparent/none option, so I had to override outline-width for the classes. So I set

outline-width: 0px !important;
like image 137
Ford Avatar answered Jan 04 '23 14:01

Ford


The code applying the border to that button is (it includes other things, but I'm putting just the relevant part here):

.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default {
    border: 1px solid #D3D3D3;
}

And in that case, the <button> element matches all 3 selectors, so you could use a selector like this:

.ui-dialog-titlebar > .ui-button {
    border: 3px solid red;
}

To override the default style just for the dialog buttons...

Jsbin Demo

like image 44
DarkAjax Avatar answered Jan 04 '23 15:01

DarkAjax