2012-08-23 32 views
0

我試圖把一個jQuery的移動列表視圖內的父div,但列表視圖忽略任何父c​​ss規則。jquery mobile listview忽略父div div css規則

<div data-role="page" id="profile"> 
    <div data-role="content"> 
    <div class="content_white"> 
     <ul data-role="listview" data-theme="c" class="custom-list"> 
      <li>test</li> 
      <li>one</li> 
     </ul> 
    </div> 
    </div> 
</div> 

父div有以下CSS規則

.content_white{ 
position:relative; 
margin-bottom:5% !important; 
background-color:#ffffff; 
border:1px solid #cccccc; 
-webkit-border-radius: 5px; 
-moz-border-radius: 5px; 
border-radius: 5px; 

}

基本上我希望父DIV

JS fiddle answer

回答

0

圍繞邊緣內ListView控件嵌套在名單上似乎是伎倆

.custom-list{ 
margin: 0 auto !important; 
padding-bottom:1%; 
}