This is a migrated thread and some comments may be shown as answers.

Help with menu

2 Answers 79 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Mick
Top achievements
Rank 1
Mick asked on 06 Jun 2009, 09:30 PM
I have the task of converting a pre-existing menu to use the RadMenu control. The current CSS is defined as:

/* Menu */ 
 
#menu {  
    width770px;  
    height65px;  
    margin: 0 auto;  
    border-right1px solid #EDEBD5;  
}  
 
#menu ul {  
    margin: 0;  
    padding: 0;  
    list-stylenone;  
}  
 
#menu li {  
    displayinline;  
}  
 
#menu a {  
    displayblock;  
    floatleft;  
    width109px;  
    height45px;  
    padding20px 0 0 0;  
    border-left1px solid #EDEBD5;  
    text-transformlowercase;  
    text-decorationnone;  
    text-aligncenter;  
    font-size: 144%;  
    color#BABABA;  
}  
 
#menu a:hover {  
    background#F7F7F4;  
}  
 
#menu .active a {  
    background#ba3a01;  
    color#FFFFFF;  

and a html example of this is:

<div id="menu">  
    <ul> 
        <li class="active"><href="#">Home</a></li>  
        <li><a href="#">Link 2</a></li>  
        <li><a href="#">Link 3</a></li>  
        <li><a href="#">Link 4</a></li>  
        <li><a href="#">Link 5</a></li>  
        <li><a href="#">Link 6</a></li>  
        <li><a href="#">Link 7</a></li>  
    </ul> 
</div> 

Where active is the currently selected menu item.
I am just wondering if anyone can show me how I can replace the static menu with a radmenu but preserve the current style of the menu.

Regards

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 09 Jun 2009, 06:44 AM
Hi Mick,

I would suggest you use the ItemTemplate of RadMenu. Try the following approach and see whether it helps.

ASPX:
 
    <telerik:RadMenu ID="RadMenu1" Flow="Horizontal"  CssClass="menu"   runat="server"
         
        <Items> 
         <telerik:RadMenuItem  > 
             <ItemTemplate> 
              <div id="menu">   
                    <ul>  
                        <li class="active"><href="#">Home</a></li>   
                        <li><a href="#">Link 2</a></li>   
                        <li><a href="#">Link 3</a></li>   
                        <li><a href="#">Link 4</a></li>   
                        <li><a href="#">Link 5</a></li>   
                        <li><a href="#">Link 6</a></li>   
                        <li><a href="#">Link 7</a></li>  
                         
                    </ul>  
             </div> 
          </ItemTemplate> 
          </telerik:RadMenuItem> 
        </Items> 
    </telerik:RadMenu> 
 


Thanks
Shinu
0
L M
Top achievements
Rank 1
answered on 04 Aug 2009, 02:41 AM


Hi, I have a question. How do itemtemplate from the code-behind in aspx.cs?
Tags
Menu
Asked by
Mick
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
L M
Top achievements
Rank 1
Share this question
or