I have created a jQuery Dialog
as in this Demo. It is working properly. close button is display in right side in there. but on my site, running on localhost, close button is display in left side as in below image.
How can i solve this ?
Close Button Style
<button class="ui-button ui-widget ui-state-default ui-corner-all ui-button-icon-only ui-dialog-titlebar-close" role="button" aria-disabled="false" title="close">
<span class="ui-button-icon-primary ui-icon ui-icon-closethick"></span>
<span class="ui-button-text">close</span>
</button>
The difference between your example files and the jsFiddle demo is the the jsFiddle includes a jQueryUI theme which is adding some CSS rules to the
<button>
.By adding any jQueryUI theme to your demo, it corrects the problem. For example, including:
adds the style:
which includes
position: absolute
. Withoutposition
, theright: 0
that I added in the other question Hide Title bar and Show Close Button in jQuery Dialog has no effect, which explains why the button appears on the left, since that is where it would naturally appear in normal flow.So if you are not using a jQueryUI theme, then you need to add
position: absolute
to the close button's rules, like this:this is css that u need change :)
http://prntscr.com/1fwgfz
One possibility - The styles are conflicting. Check for the
left:
(orright:
) CSS attributes in your html and CSS files. I think the styles for the class -.ui-dialog .ui-dialog-titlebar-close
are conflicting.
Edit: