Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

asp menu need to change hyperlink size

Posted on 2011-02-18
6
Medium Priority
?
523 Views
Last Modified: 2012-05-11
i have a static/dynamic asp.net menu working which is mapped to a sitemapprovider. it works fine - the problem that i now have is the customer wants the menu (which are all hyperlinks to be a different size than all the other hyperlinks on the site.) All of the link tags are in the CSS file...

here is the element definition - i have tried changing the sizes for both dynamic and static  - but they are being overridden by the CSS... how / where do i put the size change in THE URL link?
 <asp:Menu ID="MastHeadMenu" runat="server" BackColor="#3379AE"
                                                    DataSourceID="SiteMapDataSource1" DynamicHorizontalOffset="2"
                                                    Font-Bold="True" ForeColor="White"
                                                    MaximumDynamicDisplayLevels="2" Orientation="Horizontal"
                                                    StaticEnableDefaultPopOutImage="False"
                                                    Width="800px" DynamicMenuItemStyle-ItemSpacing="2px"
                                                    StaticSubMenuIndent="24px" >
                                                    <StaticMenuItemStyle HorizontalPadding="5px"  
                                                        VerticalPadding="0px" Width="180px" />
                                                    <DynamicMenuStyle BackColor="#006699" />
                                                    <DynamicMenuItemStyle VerticalPadding="1px"  HorizontalPadding="5px"   />
                                                </asp:Menu>
0
Comment
Question by:quigleyryan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 12

Expert Comment

by:HugoHiasl
ID: 34929778
Set a CssClass and define it there.
0
 
LVL 6

Expert Comment

by:t-max
ID: 34929859
You can put the "style" property in the <a> tag, like mentioned here: http://msdn.microsoft.com/en-us/library/h4kete56.aspx
0
 

Author Comment

by:quigleyryan
ID: 34929873
even if i set up the menu with a CSSClass - it still gets overridden by the a:link in the css...
so i need to put the font tag in the <a href> area, but don't know where that is - in the asp menu definition
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 6

Expert Comment

by:t-max
ID: 34929874
0
 

Author Comment

by:quigleyryan
ID: 34929901
t-max -- yes this is what i need to do, but where is the <a> tag in the asp.net menu... see code above.. the provider has
    Public Overrides Function BuildSiteMap() As SiteMapNode
        ' Only allow the Site Map to be created by a single thread
        SyncLock Me
            ' Attempt to get Root Node from Cache
            Dim context As HttpContext = HttpContext.Current
            _rootNode = CType(context.Cache("RootNode"), SiteMapNode)

            If _rootNode Is Nothing Then
                HttpContext.Current.Trace.Warn("Loading from database")

                ' Clear current Site Map
                Clear()

                ' Load the database data
                Dim tblSiteMap As DataTable = GetSiteMapFromDB()

                ' Get the root node
                _rootNode = GetRootNode(tblSiteMap)
                AddNode(_rootNode)

                ' Build the child nodes
                BuildSiteMapRecurse(tblSiteMap, _rootNode)
0
 
LVL 6

Accepted Solution

by:
t-max earned 2000 total points
ID: 34929953
I think you need the MenuItemStyle tag. Take a look to the example and properties here: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.menuitemstyle.aspx
Won't be able to help more now, but I hope this helps you. Good luck!
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question