Louis
Louis

Reputation: 2618

change height of buttons in jquery mobile 1.4, best practices

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 :

enter image description here

Here's my html :

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

Upvotes: 0

Views: 57

Answers (1)

ezanker
ezanker

Reputation: 24738

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;
}

Upvotes: 1

Related Questions