Solved

asp menu need to change hyperlink size

Posted on 2011-02-18
6
520 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
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 
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 500 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

WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

Question has a verified solution.

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

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

617 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