Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery mobile listview and input button overlap

I have the following to display a list of items and a button underneath the list. However the button is overlapping on top of the list. I must be not putting some kind of data-role or another one of their attributes on it.

<div data-role="content" data-theme="b">    
    <div>
       <ul id="listOfSheets" data-role="listview" >
     <li class="hidden"> <a href="_linkToSheet" data-ajax="false"> _sheetName</a></li>
      </ul>
    </div>  
    <input id="logout" type="button" value="Sign Out"    />
 </div><!-- /content -->

Here is what it looks like:

enter image description here

like image 482
dev.e.loper Avatar asked Oct 07 '11 04:10

dev.e.loper


1 Answers

Live Example:

  • http://jsfiddle.net/B7nhA/ (the problem)
  • http://jsfiddle.net/B7nhA/1/ (the fix)

You're missing one of the attributes for the listview

data-inset="true"

HTML

<div data-role="content" data-theme="b">    
    <div>
        <ul id="listOfSheets" data-role="listview" data-inset="true">
            <li class="hidden"><a href="#" data-ajax="false">Link 1</a></li>
            <li class="hidden"><a href="#" data-ajax="false">Link 2</a></li>
            <li class="hidden"><a href="#" data-ajax="false">Link 3</a></li>
        </ul>
    </div>  
    <input id="logout" type="button" value="Sign Out" />
</div><!-- /content -->
like image 164
Phill Pafford Avatar answered Oct 12 '22 16:10

Phill Pafford