My challenge lies here:
I am facing an issue with my External Style Sheet where the "*" selector is defined as follows:
*
{
margin: 0em 4.2em 0em 0em;
padding: 0em;
}
The problem arises when I have a tree view control in my aspx page. The above selector is causing my tree view to display incorrectly.
Below is the code snippet:
<div id="treeview" style="padding-right:250px; padding-left:150px; width:1040px;margin-left:495px;">
<asp:TreeView ID="TreeView1" runat="server" ShowLines="true" SelectedNodeStyle-ForeColor="Green" CssClass="TreeViewClass" Style="margin: 0em 0em 0em 0em !important;"
SelectedNodeStyle-VerticalPadding="0" Target="_blank">
</asp:TreeView>
</div>
To resolve this, removing the margin from the "*" selector fixes the tree view but disrupts other elements. Attempting to add an inline Style attribute to the TreeView control was unsuccessful. Utilizing a different CSS class for the tree view also did not provide relief.
Even trying the not selector of CSS proved ineffective for me.
Your assistance would be greatly appreciated. How can I maintain both stylings successfully?