Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - styling asp.net 2.0 menu control

 
Thread Tools Search this Thread
Old 08-03-2007, 10:11 PM   #1
Default styling asp.net 2.0 menu control


I am trying to apply the hover style to the Menu Control.
Here is the code snippet

<SharePoint:AspMenu id="QuickLaunchMenu"
DataSourceId="QuickLaunchSiteMap" runat="server"
Orientation="Vertical" StaticDisplayLevels="2" ItemWrap="true"
MaximumDynamicDisplayLevels="0" StaticSubMenuIndent="0"
SkipLinkText="">
<StaticHoverStyle CssClass="ms-LeftNavHover" />
<DynamicHoverStyle CssClass="ms-LeftNavHover"
BackColor="#697D98" />

<LevelMenuItemStyles>
<asp:menuitemstyle CssClass="ms-navheader" />
<asp:menuitemstyle CssClass="ms-navitem" />
</LevelMenuItemStyles>
<LevelSubMenuStyles>
<asp:submenustyle CssClass="ms-navSubMenu1" />
<asp:submenustyle CssClass="ms-navSubMenu2" />
</LevelSubMenuStyles>
<LevelSelectedStyles>
<asp:menuitemstyle CssClass="ms-selectednavheader" />
<asp:menuitemstyle CssClass="ms-selectednav" />
</LevelSelectedStyles>
</SharePoint:AspMenu>

I am trying to apply a background color to a menu item when it is
hovered using the line
<DynamicHoverStyle CssClass="ms-LeftNavHover" BackColor="#697D98" />

However the problem is that , background color gets applied only to
the text, not the whole rectangular item.

I have a different background set in the style ms-navheader which is
applied to the rectangular area around the text. I expect the same
color to be replaced while applying hover style but only the
background of the text is replaced and not the whole item.

Hope I have explained my problem clearly and will appreciate any ideas

Madhur



madhur
  Reply With Quote
Old 08-04-2007, 05:52 PM   #2
yubyub
 
Posts: n/a
Default Re: styling asp.net 2.0 menu control
On Aug 3, 2:11 pm, madhur <ahuja.mad...@gmail.com> wrote:
> I am trying to apply the hover style to the Menu Control.
> Here is the code snippet
>
> <SharePoint:AspMenu id="QuickLaunchMenu"
> DataSourceId="QuickLaunchSiteMap" runat="server"
> Orientation="Vertical" StaticDisplayLevels="2" ItemWrap="true"
> MaximumDynamicDisplayLevels="0" StaticSubMenuIndent="0"
> SkipLinkText="">
> <StaticHoverStyle CssClass="ms-LeftNavHover" />
> <DynamicHoverStyle CssClass="ms-LeftNavHover"
> BackColor="#697D98" />
>
> <LevelMenuItemStyles>
> <asp:menuitemstyle CssClass="ms-navheader" />
> <asp:menuitemstyle CssClass="ms-navitem" />
> </LevelMenuItemStyles>
> <LevelSubMenuStyles>
> <asp:submenustyle CssClass="ms-navSubMenu1" />
> <asp:submenustyle CssClass="ms-navSubMenu2" />
> </LevelSubMenuStyles>
> <LevelSelectedStyles>
> <asp:menuitemstyle CssClass="ms-selectednavheader" />
> <asp:menuitemstyle CssClass="ms-selectednav" />
> </LevelSelectedStyles>
> </SharePoint:AspMenu>
>
> I am trying to apply a background color to a menu item when it is
> hovered using the line
> <DynamicHoverStyle CssClass="ms-LeftNavHover" BackColor="#697D98" />
>
> However the problem is that , background color gets applied only to
> the text, not the whole rectangular item.
>
> I have a different background set in the style ms-navheader which is
> applied to the rectangular area around the text. I expect the same
> color to be replaced while applying hover style but only the
> background of the text is replaced and not the whole item.
>
> Hope I have explained my problem clearly and will appreciate any ideas
>
> Madhur


CSS can behave strangely because tags inherit styles. I can't tell you
the exact answer, but with CSS I always perform these steps to debug.
First, remove all the styles. Then Apply them 1 at a time. That should
tell you which one is overriding the other.



yubyub
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
help required in file upload control in asp.net Upmanyu Software 0 03-27-2008 01:51 PM
want to display .chm in browser control of ASP.NET 2.0 pratibhaskhaire General Help Related Topics 0 02-14-2008 06:23 AM
Nested forms and server-side control in ASP.NET mredelin Software 0 12-20-2007 09:12 PM
asp.net Menu control: direction/indentation of sub-menus crayon Software 1 12-18-2007 09:00 PM
ASP.Net 2.0 - Want details view but need control & placement of textboxes etc. daveydave999 Software 0 10-05-2007 04:12 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46