Solved

asp menu need to change hyperlink size

Posted on 2011-02-18
6
470 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
  • 3
  • 2
6 Comments
 
LVL 12

Expert Comment

by:HugoHiasl
Comment Utility
Set a CssClass and define it there.
0
 
LVL 6

Expert Comment

by:t-max
Comment Utility
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
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 6

Expert Comment

by:t-max
Comment Utility
0
 

Author Comment

by:quigleyryan
Comment Utility
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
Comment Utility
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 run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

762 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now