I'm using VS 2010 and the ASP.NET Me开发者_StackOverflownu control is adding the following inline style:
style="float: left;"
I added the following to the control's declaration:
IncludeStyleBlock="false" CssClass="myClass" style=""
without success. Is there a trick to get this control to NOT add styling?
The menu is rendering as such:
<div class="myMenu" style="float: left;" >
<ul id="menu" style="float: left ....
</div>
The top level div doesn't need to float. I'm not sure how to fix this.
The float:left
is what is making the menu items appear side-by-side. Is this not what you want?
If you really want it gone, you can try modifying your css:
.myClass { float: none !important; }
Using inline styles overwrites behaviour of other css defined styles. The solution that I used was jQuery:
$("<DIV> id").removeAttr("style");
$("<UL> class").removeAttr("style");
$("<UL> class").find("li").removeAttr("style");
Regards!
精彩评论