NetTalk Central

Author Topic: Mobile button sizing - how to make it wider  (Read 2613 times)

debraballenger

  • Newbie
  • *
  • Posts: 49
    • View Profile
    • Email
Mobile button sizing - how to make it wider
« on: March 06, 2013, 04:59:11 PM »
Hi All, I am wanting a button to appear in a browse and to have it be the same width as the page.  I can do this in a regular html\jquery page (example html is below) .  In my NT browse though it is not the same width, its only as big as the text I have attached to it. My browse only has 1 column... I have attached a screen shot of how it looks in NT and how I want it to look.
How can I make it look this way?


<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="user-scaleable=no, initial-scale=1, minimum-scale=1, maximum-scale=1, width=device-width, height=device-height"
<title>jQuery Mobile Web App</title>
<link href="jquery.mobile.theme-1.0.min.css" rel="stylesheet" type="text/css"/>
<link href="jquery.mobile.structure-1.0.min.css" rel="stylesheet" type="text/css"/>
<script src="jquery-1.6.4.min.js" type="text/javascript"></script>
<script src="jquery.mobile-1.0.min.js" type="text/javascript"></script>
</head>
<body>

<div data-role="page" id="page">
   <div data-role="header">
      <h1>Page One</h1>
   </div>
   
   <div data-role="content">
     <button data-icon="star" data-iconpos="left">Button</button>
   </div>
   <div data-role="footer">
      <h4>Page Footer</h4>
   </div>


</body>
</html>

[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Mobile button sizing - how to make it wider
« Reply #1 on: March 06, 2013, 11:39:50 PM »
Hi Debra,

the answer is in two parts;

a) I think you've done this part - but just to be sure. You need to set 4 bits of CSS.
On browse CSS Classes tab.
Procedure, Table div and Table all set to
' nt-width-100'
(note the leading space)

Also for the button itself, CSS tab (look up, next to General) set Contents also to
' nt-width-100'

b) Then you'll need build 7.07 (or later). I've added a switch on the properties tab.
Button Compact in Mobile
this defaults to on (which is the current internal behavior) and you want to turn this off.

Cheers
Bruce