jQM - How to create image button?

Go To StackoverFlow.com

0

I am trying to create a button with an image on it. No text. I used the following and it's not working. Am I missing something?

<div data-role="footer" data-position="fixed" style="height:44px">
  <img src="Assets/logo.png" style="vertical-align:middle;margin:4px 4px 4px 4px;" align="left"/>
  <img src="Assets/whatwhyhow/what_off.png" style="vertical-align:middle;margin:10px 4px 20px 4px;padding-left:20px;" align="left"/>
</div>
2012-04-04 18:20
by Muthu
Please be more specific...what is ur main problem - sujal 2012-04-04 18:23
I wanted to have image in a button. Looks like jQM adds its button rendering on top of it. I wanted to see if I can disable the default behavior and show this image as a button.

Something like: Muthu 2012-04-19 02:38

@muthuka vertical align would not be a good idea as this works for table cells use padding to centre it top and bottom and use same hight as the image. Also unless Assets folder/dir is on the same directory as the file viewed you will have a problem, look into relative URLs and absolute URLs hope it help - Val 2012-07-04 09:42


0

<a data-role="button" href="#next_page">
<img src="logo.jpg"/>
</a>
2012-07-04 07:25
by Tom
Ads