PDA

View Full Version : [CLOSED] how to beautify asp.net menu control?



hdsoso
Oct 26, 2013, 4:26 PM
hi team,
i originally want to use ext:menu control, but may be it is not suitable use to web menu .so i use the default control , but i am not familiar to custom css to it.


<asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" Width="960px" Font-Bold="True" Font-Size="14px" ForeColor="White" BackColor="#0066FF" BorderColor="Blue" BorderStyle="Solid" BorderWidth="1px">
<DynamicHoverStyle ForeColor="#C6FF20" />
<DynamicMenuItemStyle BackColor="#0066FF" ForeColor="White" />

<DynamicSelectedStyle ForeColor="#C6FF20" />

</asp:Menu>

i have several question:

i have added height property to the asp:menu, but the text in the menu is not vertical center.
how to add padding or margin to the root menu item, because the width between menus is narrow.
how to add padding to the sub menu item, the default width between border and text is narrow.

on line demo is :http://qizweb.com
can you help me ? thanks.

geoffrey.mcgill
Oct 28, 2013, 5:09 AM
Hello,

It would be best to post questions specific to ASP.NET or ASP.NET Controls on StackOverflow (http://stackoverflow.com/).

The Ext.NET forums are best suited for questions related to Ext.NET components.

Daniil
Oct 28, 2013, 5:12 AM
Hi,

Could you also clarify why an Ext.NET Menu component is not suitable for you?

hdsoso
Oct 28, 2013, 5:41 AM
Hi,

Could you also clarify why an Ext.NET Menu component is not suitable for you?

i want to use ext.net menu , but i think it is difficult to custom css .

could you please give some idea how to change ext.net menu's view ?

Daniil
Oct 28, 2013, 6:30 AM
What exactly what you like to change?

Here is an example of changing the text color.

Example

<%@ Page Language="C#" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<!DOCTYPE html>
<html>
<head runat="server">
<title>Ext.NET v2 Example</title>

<style>
.my-menu .x-menu-item-text {
color: green;
}
</style>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />

<ext:Button runat="server" Text="Menu">
<Menu>
<ext:Menu runat="server" Cls="my-menu">
<Items>
<ext:MenuItem runat="server" Text="Item 1" />
<ext:MenuItem runat="server" Text="Item 2" />
</Items>
</ext:Menu>
</Menu>
</ext:Button>
</form>
</body>
</html>

hdsoso
Oct 28, 2013, 7:38 AM
7129
http://dtop.powereasy.net/Category.aspx?id=115
i want to beautify the above menu, can you help me to do a demo with ext.net menu?

Daniil
Oct 28, 2013, 12:19 PM
We don't have such an example, but this should help you to start.
http://examples2.ext.net/#/Toolbar/Menu/Horizontal_Menu/