Can you please advise me how can i mark current tab in menu via css class? Its very often used and it seems to me that CSS Friendly Control Adapters can't do it.
Why cssFriendAdapter apply this css rules via javascrip? (address of WebResource.axd is from Opera dragonfly):
WebResource.axd?d=yeR-S3dIRegEwl48J-pNCGtADeel_bDrzVlgwAC3weF9beBmeuP1Rzq-F8-7eO0cAyMNljfbzYpcPZmO1VfCCQ2&t=634220529578589851
ul.AspNet-Menu li a, ul.AspNet-Menu li span {
height: 1% !important;
}
WebResource.axd?d=yeR-S3dIRegEwl48J-pNCF-5aoQkLcsn4eZvcO8cmp5T-ebw_SlxBl44LOCR9sdn0&t=634220529578589851
ul.AspNet-Menu li a, ul.AspNet-Menu li span {
display: block;
text-decoration: none;
}
Mainly "height: 1% !important;" driving me crazy. There was more and i must override it with more specify css rule.
onpelikan
Member
6 Points
13 Posts
StaticMenuItemSelected-cssClass
Oct 05, 2010 03:15 PM|LINK
Can you please advise me how can i mark current tab in menu via css class? Its very often used and it seems to me that CSS Friendly Control Adapters can't do it.
I have used this code:
<asp:Menu ID="menu1" runat="server" DataSourceID="SiteMapDataSource1" Orientation="Horizontal" StaticDisplayLevels="2" MaximumDynamicDisplayLevels="0" EnableViewState="False" StaticSelectedStyle-CssClass="aktualni"> <DynamicSelectedStyle CssClass="aktualni" /> <StaticSelectedStyle CssClass="aktualni"></StaticSelectedStyle> </asp:Menu>chayadi
Participant
1173 Points
252 Posts
Re: StaticMenuItemSelected-cssClass
Oct 07, 2010 10:14 AM|LINK
From what i understand, your code didn't implement a CSS friendly control adapter.
To implement css friendly, you have to copy the dll to your bin, and use CssSelectorClass attribute (expand) in asp menu control.
for code example: http://www.asp.net/cssadapters/
and http://www.asp.net/general/videos/how-do-i-utilize-the-css-friendly-control-adapters
This will help other with the same problem in future.
onpelikan
Member
6 Points
13 Posts
Re: StaticMenuItemSelected-cssClass
Oct 07, 2010 06:09 PM|LINK
Thank you. Now it is right.
Another question:
Why cssFriendAdapter apply this css rules via javascrip? (address of WebResource.axd is from Opera dragonfly):
WebResource.axd?d=yeR-S3dIRegEwl48J-pNCGtADeel_bDrzVlgwAC3weF9beBmeuP1Rzq-F8-7eO0cAyMNljfbzYpcPZmO1VfCCQ2&t=634220529578589851 ul.AspNet-Menu li a, ul.AspNet-Menu li span { height: 1% !important; } WebResource.axd?d=yeR-S3dIRegEwl48J-pNCF-5aoQkLcsn4eZvcO8cmp5T-ebw_SlxBl44LOCR9sdn0&t=634220529578589851 ul.AspNet-Menu li a, ul.AspNet-Menu li span { display: block; text-decoration: none; }Mainly "height: 1% !important;" driving me crazy. There was more and i must override it with more specify css rule.