In fact the jQuery mobile modifies the HTML code by creating 1 inner span called .ui-btn-inner
, this span wraps 2 other spans called .ui-btn-text
and .ui-icon
. So when you set padding-top
on the a
element, the whole inner span .ui-btn-inner
is pulled down and the style is still effected making the ugly gradient above the text. So instead of setting padding-top
on the a
element, you have to set it on the .ui-btn-inner
. However it's not such simple, the .ui-icon
is positioned absolutely causing problem to align the button text and button icon. So I've tried setting the position to static
, floating it to the left, adjusting the margin accordingly... Here is the CSS:
#header-right-button .ui-btn-inner {
padding-left:5px;
padding-top:13px;
}
#header-right-button .ui-icon {
position:static;
float:left;
margin:0;
margin-right:5px;
}
#header-right-button {
height:80px;
}
Demo.
If you want to remove the gradient border, try setting the border:none
on the .ui-btn-inner
. Here is the Demo. for this. It's fortunate that, if you just want this we have a much simpler code because you can just set the padding-top
on the #header-right-button
:
#header-right-button {
padding-top:10px;
height:80px;
}
#header-right-button > .ui-btn-inner {
border:none;
}