ASP.NET ListView Padding
I am using two listviews to display two tag clouds (a red one and a green one). When the tag gets quite big, it overlaps the smaller ones. Is there a way to space out the tags, i.e vertical padding or something?
<div style="padding-left: 25px; padding-right: 25px; text-align: center;">
<asp:listview runat="server" ID="ListView1" ItemPlaceholderID="itemPlaceHolder">
<LayoutTemplate>
<asp:PlaceHolder runat="server" ID="itemPlaceHolder"></asp:PlaceHolder>
</LayoutTemplate>
<ItemTemplate>
<a href="n开发者_JAVA百科egativestorydetail.aspx?tag=<%# Eval("Tag") %>" style="color: #ff0000; text-align: center; margin: 15px; text-decoration:none; font-size: <%# GetTagSize(Convert.ToDouble(Eval("weight"))) %>"><%# Eval("Tag") %></a>
</ItemTemplate>
<EmptyDataTemplate>
<asp:Label ID="negative_tags" runat="server" Text=""></asp:Label>
</EmptyDataTemplate>
</asp:listview>
</div>
<br />
<div style="padding-left: 25px; padding-right: 25px; text-align: center;">
<asp:listview runat="server" ID="ListView2" ItemPlaceholderID="itemPlaceHolder">
<LayoutTemplate>
<asp:PlaceHolder runat="server" ID="itemPlaceHolder"></asp:PlaceHolder>
</LayoutTemplate>
<ItemTemplate>
<a href="positivestorydetail.aspx?tag=<%# Eval("Tag") %>" style="color: #33cc00; text-align: center; margin: 15px; text-decoration:none; font-size: <%# GetTagSize(Convert.ToInt32(Eval("weight"))) %>"><%# Eval("Tag") %></a>
</ItemTemplate>
<EmptyDataTemplate>
<asp:Label ID="positive_tags" runat="server" Text=""></asp:Label>
</EmptyDataTemplate>
</asp:listview>
</div>
Yes,
on your <a>
tags you can add:
line-height: 30px
or alternativelly you can add
padding-top:5px; padding-bottom:5px
精彩评论