I have some CSS elements based on ids of HTML elements. e.g.
ul#subNav div
{
/*top:45px !important;*/
position: relative;
visibility: hidden;
margin: 0;
padding: 0;
background: #C6DEFF;
border: 1px solid #5970B2;
z-index:2020;
}
Now, I cannot apply this style to a Webpage (ASP.NET Web form) based on a Master Page, since, at the time of rendering, The ID of UL “subnav” changes to “ctl100_subnav” and hence browser no longer applies the CSS.
Any idea to overcome this?
Thanks in advance.
Add a class to the SubNav div and apply CSS to the class and not to the ID.
Or you are using .net 4