2013-07-21 63 views
0

我有以下代码我希望能够缩小缩略图图像和每个列表视图内的描述列表之间的差距。减少jquery移动listview缩略图和文字之间的差距

我的CSS

.myParagraph.ui-li-desc { 
     color:#333; 
     overflow:show; 
     white-space:normal; 
     height:28px; 
     margin-bottom:0px; 
    } 

我的标记

listitems_markup = '<li><img src="' + itemThumbnail + '"><div class="myParagraph"><ul data-inline="true" style="font-size:60%; font-weight:normal;"><li style="white-space:normal">You viewed ' + itemName + '</li><li style="white-space:normal">You spent '+itemTimeSpent+' on this activity</li><li style="white-space:normal">You '+itemRating+' this item</li><p class="ui-li-aside">'+itemViewedTime+'</p></ul></div></li>'; 

这是什么样子

enter image description here

回答

1

您可能要减少左填充的是列表由大多数浏览器自动设置。

ul{ 
padding-left:10px; //do not set this to 0 because of the list marks 
border-left:0px; 
margin-left:0px; 
} 
+0

安德拉什感谢的作品:) – Dot

+0

安德拉什我有这个问题,当我去到另一个网页,回来的造型变化并退回到具有较大的差距 – Dot

+0

确保使用相同的CSS代码在我的答案中的每一个页面上。 (而不是使用一个CSS文件来处理所有样式,而不是内联CSS的多个页面) –