Align image to left on button

Description

The following code shows how to align image to left on button.

Example


<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://code.jquery.com/jquery-1.8.3.js'></script>
<script type="text/javascript"
  src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.js"></script>
<link rel="stylesheet" type="text/css"
  href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.css">
<style type='text/css'>
.ui-btn-text {<!--from   www  . ja va 2 s.c  o m-->
  line-height: 43px;
}
</style>
</head>
<body>
  <div data-role="page" id="main">
    <div data-role="header" data-position="fixed"
      style="position: absolute;">
      <h1>Main</h1>
    </div>
    <!-- /header -->
    <div data-role="button" onclick="someFunction()">
      <img align="left" width="35px"
        src="http://placehold.it/40x40" />Button 1
    </div>
    <div data-role="button" onclick="someFunction()">
      <img align="left" width="35px"
        src="http://placehold.it/40x40" />Button 2
    </div>
  </div>
</body>
</html>

Click to view the demo





















Home »
  jQuery Mobile »
    Example »




Button
Button Event
Button Icon
Button Text
Checkbox
Collapsible
Date
Dialog
Event
Footer
Form
Header
Icon
Input
Layout
Listview
Listview Divider
Listview Item
Loader
mobile_settings
Navbar
Page
Page Event
Popup
Radio
Select
Slider
Switch
Textarea
Theme