Currently, I am developing a VB ASP.NET site using Visual Studio 2012 Express for Web. Within my project, there is a Repeater containing two div elements with the css classes .dnnFormLabel and .dnnFormItem. Here is a snippet of code from the Repeater:
<div class="dnnFormLabel dnnFormShort">
<asp:CheckBox runat="server" ID="chkSubQuestionBox" Text='<%#Eval("Label")%>' />
</div>
<div class="dnnFormItem dnnFormShort">
<div>
<label><span>
<asp:Label ID="lblSubQuestionLabel" runat="server"><%#Eval("Prefix")%> <%#Eval("Label")%></asp:Label></span></label></div>
<asp:TextBox runat="server" TextMode="MultiLine" ID="txtSubQuestionBox"></asp:TextBox>
<%#Eval("description")%>
</div>
I have been trying to hide the div element with the class .dnnFormItem when it is empty. Despite applying the following CSS rule:
.dnnFormItem:empty {
display: none !important;
}
The above method did not work as expected. Can someone provide guidance on how to achieve this? Any help would be greatly appreciated.