如何删除Jquery Mobile Panel表单的填充?

时间:2013-07-11 02:37:15

标签: jquery html jquery-mobile

只要我添加一个表单标签,我就会在表单元素周围出现这种令人讨厌的填充。有没有办法解决这个问题?

屏幕截图:https://s3.amazonaws.com/thom-temp/jquerymobile-wtf.png

<div id="advancedSearch" data-role="panel" data-position="right" data-display="push">
  <div data-role="header">
    <h1>Search</h1>
    <a id="searchButton" href="#" class="ui-btn-right" data-role="button" data-theme="d" data-icon="search">Go</a>
  </div>

  <div data-role="content">
    <form style="margin: 0px; padding: 0px;" id="yw2" action="/mshi/index-test.php/inspection/list" method="get">
      <ul data-role="listview" data-inset="false" data-theme="a">

        <li data-role="fieldcontain">
          <input placeholder="Id" name="inspection[id]" id="inspection_id" type="text" />
        </li>
      </ul>
    </form>
  </div>
</div>

2 个答案:

答案 0 :(得分:9)

覆盖.ui-panel-inner&#39; s padding

.ui-panel-inner { 
  padding: 0 !important;
}
  

<强> Demo

答案 1 :(得分:1)

在“标题”和“内容”div中添加margin: 0px; padding: 0px;