我在垂直居中檢查符號時遇到問題。默認情況下,它位於左下角。帶圖像的複選框列表
這是我的CheckBoxList什麼樣子:
,這是我多麼希望它看起來像:
<asp:CheckBoxList ID="FoodCheckBoxList" runat="server" RepeatColumns="3" RepeatDirection="Horizontal">
<asp:ListItem> <img src="../images/foods/Food1.png" /> </asp:ListItem>
<asp:ListItem> <img src="../images/foods/Food2.png" /> </asp:ListItem>
<asp:ListItem> <img src="../images/foods/Food3.png" /> </asp:ListItem>
<asp:ListItem> <img src="../images/foods/Food4.png" /> </asp:ListItem>
<asp:ListItem> <img src="../images/foods/Food5.png" /> </asp:ListItem>
<asp:ListItem> <img src="../images/foods/Food6.png" /> </asp:ListItem>
<asp:ListItem> <img src="../images/foods/Food7.png" /> </asp:ListItem>
<asp:ListItem> <img src="../images/foods/Food8.png" /> </asp:ListItem>
<asp:ListItem> <img src="../images/foods/Food9.png" /> </asp:ListItem>
</asp:CheckBoxList>
請將您的代碼張貼在小提琴上。 –
嘗試爲等於圖像高度的複選框設置行高並給出vertical-align:middle;如果你可以在你的代碼 –
soooo中使用css。爲什麼downvote? –