How to remove extra padding in dijit.form.Button in IE?

狂风中的少年 提交于 2019-12-11 05:31:37

问题


In our application there are many dojo buttons of type dijit.form.Button. It works fine in Firefox. However, in IE, there are extra padding to the left and right of the texts in the button. The length of the padding is proportional to the length of the text in the button.

Is there any way to remove those paddings?

I searched the web and found ways for Buttons, for example: http://www.viget.com/inspire/styling-the-button-element-in-internet-explorer/

However, it does not work for dijit.form.Button.

Note that the dijit.form.Button is inside table cells. It seems ok (no padding) if the button is not in table cells.

Thanks in advance.


回答1:


DO:

.dijitButtonText
{
    padding:0pt;
}  

.dijitButtonText  
{       
    padding:0pt;
} 

.dijitButtonText
{      
    padding:0pt;
}

on your css....if you have assigned your buttons into different baseClass...do:

.myBaseClass .dijitButtonText
{
    padding:0pt;
}  

.myBaseClass .dijitButtonText  
{       
    padding:0pt;
} 

.myBaseClass .dijitButtonText
{      
    padding:0pt;
}

to avoid global change to every dojo button...



来源:https://stackoverflow.com/questions/8089654/how-to-remove-extra-padding-in-dijit-form-button-in-ie

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!