[CLOSED] Removing Icon Space in Menu

  1. #1

    [CLOSED] Removing Icon Space in Menu

    How can I get rid of the space for the icon in a menu?
    Last edited by Daniil; Dec 27, 2010 at 6:59 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Please clarify what space do you mean?

    You could make a screen-shot using the sample below.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!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 runat="server">
        <title>Ext.Net Example</title>
    </head>
    <body>
        <form runat="server">
        <ext:ResourceManager runat="server" />
        <ext:Button runat="server" Text="Menu">
            <Menu>
                <ext:Menu runat="server">
                    <Items>
                        <ext:MenuItem Text="Item 1" Icon="Add" />
                        <ext:MenuItem Text="Item 2" Icon="Accept" />
                    </Items>
                </ext:Menu>
            </Menu>
        </ext:Button>
        </form>
    </body>
    </html>
  3. #3
    Oh, I realized that you don't use icon.

    So, to remove this space please use the respective css rule.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!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 runat="server">
        <title>Ext.Net Example</title>
        <style type="text/css">
            .my-class a.x-menu-item {
                padding-left: 0;
            }
        </style>
    </head>
    <body>
        <form runat="server">
        <ext:ResourceManager runat="server" />
        <ext:Button runat="server" Text="Menu">
            <Menu>
                <ext:Menu runat="server" Cls="my-class" ShowSeparator="false">
                    <Items>
                        <ext:MenuItem Text="Item 1" />
                        <ext:MenuItem Text="Item 2" />
                    </Items>
                </ext:Menu>
            </Menu>
        </ext:Button>
        </form>
    </body>
    </html>
    Last edited by geoffrey.mcgill; Dec 23, 2010 at 4:02 PM.
  4. #4
    Quote Originally Posted by Daniil View Post
    Oh, I realized that you don't use icon.

    So, to remove this space please use the respective css rule.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!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 runat="server">
        <title>Ext.Net Example</title>
        <style type="text/css">
            .my-class a.x-menu-item {
                padding-left: 0;
            }
        </style>
    </head>
    <body>
        <form runat="server">
        <ext:ResourceManager runat="server" />
        <ext:Button runat="server" Text="Menu">
            <Menu>
                <ext:Menu runat="server" Cls="my-class" ShowSeparator="false">
                    <Items>
                        <ext:MenuItem Text="Item 1" />
                        <ext:MenuItem Text="Item 2" />
                    </Items>
                </ext:Menu>
            </Menu>
        </ext:Button>
        </form>
    </body>
    </html>
    Perfect!!! That works!
  5. #5
    Well, not quite...see attached image..
    Attached Thumbnails Click image for larger version. 

Name:	Capture.PNG 
Views:	198 
Size:	7.2 KB 
ID:	2088  
  6. #6
    Hi,

    Did you set ShowSeparator="false" for the menu?

Similar Threads

  1. [CLOSED] Menu Panel Icon alignment issue
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Jul 09, 2013, 2:04 AM
  2. [CLOSED] Menu Topbar Icon
    By softmachine2011 in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Jun 22, 2012, 10:45 AM
  3. Replies: 2
    Last Post: Apr 02, 2012, 7:48 AM
  4. Replies: 1
    Last Post: Jan 20, 2010, 6:08 AM
  5. Icon Menu
    By Maia in forum 1.x Help
    Replies: 2
    Last Post: Dec 18, 2009, 9:36 AM

Tags for this Thread

Posting Permissions