change height of buttons in jquery mobile 1.4, best practices

房东的猫 提交于 2019-12-13 02:56:47

问题


With JQM 1.3 the best practice to change a button's height was :

#containerdivID .ui-btn {
    height:20px;
    line-height:20px;
}

is it still right for JQM 1.4...I mean the buttons are weird, there is a kind a inner margin around them :

Here's my html :

  <div id="expShortButtonsStart">
                <button id="ExpShortGotoapp" class="ui-btn-b ui-icon-logo ui-btn-icon-right">Start</button>
  </div>

回答1:


In case the button is into a div container, you need to remove the top and bottom padding:

#expShortButtonsStart .ui-btn {
    height:20px;
    line-height:20px;
    padding-top: 0;
    padding-bottom: 0;
}

Without div container, the old way works well :

#buttonid.ui-btn {
    height:20px;
    line-height:20px;
}


来源:https://stackoverflow.com/questions/24068267/change-height-of-buttons-in-jquery-mobile-1-4-best-practices

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