简体   繁体   中英

clear div float css property

I am using jQuery ui dialog component where the dialog button is aligned to the right. The reason is because of the following property that gets set automatically.

.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
    float: right;
}

If I clear this float: right property, the alignment looks fine. I tried it through Firebug. How do I clear this CSS property from my CSS file?

Override the property. This should work.

.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
    float: none !important;
}

To avoid !important you can try add this CSS (your custom css file) after the css of the Jquery UI. The load order is relevant.

.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
    float: none;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM