Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

asp menu need to change hyperlink size

Posted on 2011-02-18
6
Medium Priority
?
528 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
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Independent Software Vendors: 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!

Question has a verified solution.

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

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 first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
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…

971 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