Reputation: 19506
This html/css:
<a href="#" class="ui-btn ui-icon-arrow-l ui-btn-icon-right">Left</a>
<a href="#" class="ui-btn ui-icon-arrow-l ui-btn-icon-notext"></a>
Produces this:
But I want this:
Upvotes: 2
Views: 1285
Reputation: 384
You can do it by setting the height
attribute to 1em
on all of your .ui-btn
elements, or any height greated than 1em. This will set them all to the same height regardless of whether they have text inside them or not.
Upvotes: 1
Reputation: 19506
<a href="#" class="ui-btn ui-icon-arrow-l ui-btn-icon-right">Left</a>
<a href="#" class="ui-btn ui-icon-arrow-l ui-btn-icon-notext">ThisWontBeVisible</a>
The class ui-btn-icon-notext
will remove the text ("ThisWontBeVisible") within the <a>
. However, if there is no text within the <a>
, it will shrink the button to a short height. Seems like a hack but also likely the simplest way to achieve the desired result.
Upvotes: 1