Click here to Skip to main content
15,923,120 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi All,

Here is my problem:

I have External Style Sheet in which I have "*" selector which defines as:

CSS
*
{
	margin: 0em 4.2em 0em 0em;
	padding: 0em;
}


Now in my aspx page I have a tree view control. Because of the above selector my tree view is not showing properly.

Here is the code

ASP.NET
<div id="treeview" style="padding-removed250px; padding-removed150px; width:1040px;margin-removed495px;">
      <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>


So by removing the margin from "*" selector it is working properly but other elements are getting disturbed. So I have added the Style attribute in the TreeView control i.e. inline. But It is not working. I have also tried making a different cssclass for treeview but does not help me.

I have also tried using the not selector of css but that doesn't work for me.

Please I need your help. What should I do to keep these both styling?
Posted
Comments
Sergey Alexandrovich Kryukov 29-Jul-15 16:16pm    
What exactly you are trying to achieve?
—SA
Member 11842305 29-Jul-15 16:32pm    
I do not want that the styling under the * selector will apply on my TreeView.
Sergey Alexandrovich Kryukov 29-Jul-15 16:48pm    
You did not answer my question. Not using anything does not mean reaching any goal.
—SA
Member 11842305 29-Jul-15 16:50pm    
not is a css selector. I wanted to use it with * selector.

1 solution

I got the solution

"http://stackoverflow.com/questions/31709970/how-to-use-not-css-selector-with-in-stylesheet"
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900