What is the default font-name of RadMenu?
Inside my RadMenu, I put:
<rad:RadMenuItem runat="server" Text="All Jobs">
<ItemTemplate>
<table border="0" cellpadding="0" cellspacing="0" style="font-family:Geneva; font-size:8pt">
<tr>
<td width="110px">
<asp:Label ID="lblQSearchBkln" runat="server" Text="All Jobs, Search: " Font-Names="Geneva" Font-Size="8pt" Width="110px"></asp:Label>
I can change my Label's font. But I can not change font else where in my RadMenu.
So, what is the default font-name in RadMenu? so that I can change my
label's font.
thanks so much.
Stanley Huang
8 Answers, 1 is accepted
You can use the following CSS rule to define the font of your menu items:
<style type="text/css">
.RadMenu .rmLink .rmText
{
font-family: Geneva;
}
</style>
Regards,
Albert
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
I am new to CSS, although I had a bit basic understanding on it.
I am using VS2005 and master page.
Pleaes give some details on how to incorporate this:
<style type="text/css">
.RadMenu .rmLink .rmText
{
font-family: Geneva;
}
</style>
into my master page?
I did this that in my master page, but VS2005 gives me a waring. I guess
it did not recognize <stype type="text/css">...
And once I put <stype type="text/css">... in, how to reference
.RadMenu .rmLink .rmText to my RadMen?
Stanley
You need to paste the supplied style tag at the end of your <head> tag. You don't need to do anything additional in order to address your menu - just add CSS definitiions to the CSS rule.
Regards,
Albert
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Sorry to bother you. In css, I am new. Please give more help.
I did put this in:
<style type="text/css">
.RadMenu .rmLink .rmText
{
font-family: Geneva;
}
</style>
and it can compile.
I also put:
<rad:RadMenuItem runat="server" Text="All Jobs To Do" NavigateUrl="Brooklyn/AJToDoEBkln.aspx" CssClass="RadMenu" Font-Size="8pt"></rad:RadMenuItem>
But it did not work. I don't see the font "Geneva" there in the page.
In addition: what is the default font-name in RadMenu?
Stanley
Please find below a sample code snippet that shows the needed approach.
<html xmlns="http://www.w3.org/1999/xhtml"> |
<head runat="server"> |
<title>Untitled Page</title> |
<style type="text/css"> |
.RadMenu .rmLink .rmText |
{ |
font-family: Geneva !important; |
font-size: 8pt !important; |
} |
</style> |
</head> |
<body> |
<form id="form1" runat="server"> |
<asp:ScriptManager ID="ScriptManager1" runat="server"> |
</asp:ScriptManager> |
<telerik:RadMenu ID="RadMenu1" runat="server"> |
<CollapseAnimation Duration="200" Type="OutQuint" /> |
<Items> |
<telerik:RadMenuItem runat="server" Text="Root RadMenuItem1"> |
<Items> |
<telerik:RadMenuItem runat="server" Text="Child RadMenuItem 1"> |
</telerik:RadMenuItem> |
<telerik:RadMenuItem runat="server" Text="Child RadMenuItem 2"> |
</telerik:RadMenuItem> |
</Items> |
</telerik:RadMenuItem> |
<telerik:RadMenuItem runat="server" Text="Root RadMenuItem2"> |
<Items> |
<telerik:RadMenuItem runat="server" Text="Child RadMenuItem 1"> |
</telerik:RadMenuItem> |
<telerik:RadMenuItem runat="server" Text="Child RadMenuItem 2"> |
</telerik:RadMenuItem> |
<telerik:RadMenuItem runat="server" Text="Child RadMenuItem 3"> |
</telerik:RadMenuItem> |
</Items> |
</telerik:RadMenuItem> |
</Items> |
</telerik:RadMenu> |
</form> |
</body> |
</html> |
All the best,
Paul
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Thank you for your great help. This problem is stubborn. I am sorry
bothering you.
I still don't see the right font in my page. I am using VS2005 and a master page. Here is my code:
<%
@ Page Language="C#" AutoEventWireup="true" CodeFile="TestMenuFont.aspx.cs" Inherits="TestMenuFont" %>
<%
@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="rad" %>
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml" >
<
head id="Head1" runat="server">
<title>Untitled Page</title>
<style type="text/css">
.RadMenu .rmLink .rmText
{
font-family: Geneva !important;
font-size: 8pt !important;
}
</style>
</
head>
<
body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="rsmManager" runat="server">
</asp:ScriptManager>
<rad:RadMenu ID="RadMenu1" runat="server" CssClass="rmLink">
<CollapseAnimation Duration="200" Type="OutQuint" />
<Items>
<rad:RadMenuItem runat="server" Text="Root RadMenuItem1">
<Items>
<rad:RadMenuItem runat="server" Text="All Jobs To Do" CssClass="RadMenu">
<Items>
<rad:RadMenuItem runat="server" Text="Child RadMenuItem 1">
</rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Child RadMenuItem 2">
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Child RadMenuItem 3">
</rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Root RadMenuItem2">
<Items>
<rad:RadMenuItem runat="server" Text="Child RadMenuItem 1">
</rad:RadMenuItem>
<rad:RadMenuItem runat="server" Text="Child RadMenuItem 2">
</rad:RadMenuItem>
</Items>
</rad:RadMenuItem>
</Items>
</rad:RadMenu>
</div>
</form>
</body>
</html>
Thanks.
Stanley
The default font of the RadMenu depends on the skin that you are using; the font of the Default skin is 12px Arial.
I am attaching a sample page that shows how to change the font of all menu items, including the markup you used to create a label.
All the best,
Alex
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Thank you for your help. I got the default font name and solved the problem.
Stanley