in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Itemalign

Last post 11-15-2007 12:41 PM by C1_GregL. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 11-12-2007 10:14 AM

    Itemalign

     I am using C1.Web.Command.2.dll, version 2.0.20053.37.  In a previous version of the web menu, I was able to display the web menu item as centered and the submenu items as left aligned.  The submenu items are correctly aligned based on the HTML below, but the menu item itselft is not aligning at all.  Sometimes it displays left, sometimes centered and sometimes right.

    The button_Orange class is the graphic that sits behind the menu control and it is aligned right with a text-align=center property.

     I appreciate any assistance so that the menu item label of "Communications" is centered with the submenu items aligned left.  Thanks! Lynda

    <TD align="right" class="button_orange" >
    <div class="button_orange">
    <
    c1c:c1webmenu id="C1webmenu2" runat="server"
    BorderColor="#004060" BackColor="Transparent"
    ForeColor="Transparent" Layout="Horizontal" BorderStyle="None"
    ItemStyle-ItemAlign="Center" ItemStyle-Font-Size=13px ItemStyle-Font-Bold=true >
    <Items>
    <c1c:C1WebMenuItem ClientScripts="" Text="Communications" ItemStyle-ItemAlign="Center" >
    <SubMenu SelectedItemStyle-BorderColor="white" ItemStyle-BorderColor="#004060"
    ItemStyle-BorderWidth="1px" ItemStyle-BorderStyle="solid" ItemStyle-ForeColor="white"
    ItemStyle-BackColor="#004060" MouseOverItemStyle-BackColor="Orange"
    ItemStyle-ItemAlign="Left" ItemStyle-Font-Size=13px ItemStyle-Font-Bold=true>
    <Items>
    <c1c:C1WebMenuItem ClientScripts="" NavigateUrl="SendKudo.aspx" Text="Send Kudo">
    </c1c:C1WebMenuItem>
    <c1c:C1WebMenuItem ClientScripts="" NavigateUrl="ReportProblem.aspx" Text="Report Problem">
    </c1c:C1WebMenuItem>
    <c1c:C1WebMenuItem ClientScripts="" NavigateUrl="SuggestionBox.aspx" Text="Suggestion Box">
    </c1c:C1WebMenuItem>
    </Items>
    </SubMenu>
    </c1c:C1WebMenuItem>
    </Items>
    </c1c:c1webmenu></div>
    </TD>

  • 11-15-2007 12:41 PM In reply to

    • C1_GregL
    • Top 10 Contributor
    • Joined on 06-11-2007
    • Pittsburgh PA
    • Posts 500

    Re: Itemalign

    Hi Lynda

    The problem is that when the menu is in Horizontal layout, the Item headers (outermost nodes) align themselves right up against each other without padding.  The ItemAlign property, you will notice, only seems to have effect when the menu is in vertical layout for the headers.

    As a workaround for a horizontal layout you can use the padding properties, such as

    <c1c:c1webmenu id="C1webmenu2" runat="server"
    BorderColor="#004060" BackColor="Transparent" ForeColor="Transparent" Layout="Horizontal" BorderStyle="None"
    ItemStyle-ItemAlign="Center" ItemStyle-Font-Size=13px ItemStyle-Font-Bold=true Width="237px" >
    <
    Items>
    <c1c:C1WebMenuItem ClientScripts="" Text="Communications" >
    <
    SubMenu>
    <
    Items>
    <
    c1c:C1WebMenuItem ClientScripts="" NavigateUrl="SendKudo.aspx" Text="Send Kudo">
    <ItemStyle LabelPaddingLeft="0px" />
    </
    c1c:C1WebMenuItem>
    <
    c1c:C1WebMenuItem ClientScripts="" NavigateUrl="ReportProblem.aspx" Text="Report Problem">
    <ItemStyle LabelPaddingLeft="0px" />
    </
    c1c:C1WebMenuItem>
    <
    c1c:C1WebMenuItem ClientScripts="" NavigateUrl="Suggestion.aspx" Text="Suggestion">
    <ItemStyle LabelPaddingLeft="0px" />
    </
    c1c:C1WebMenuItem>
    </
    Items>
    <SelectedItemStyle BorderColor="White" />
    <ItemStyle BackColor="#004060" BorderColor="#004060" BorderStyle="Solid" BorderWidth="1px"
    Font-Bold="True" Font-Size="13px" ForeColor="White" ItemAlign="Left" />
    <MouseOverItemStyle BackColor="Orange" />
    </
    SubMenu>
    <ItemStyle ItemAlign="Center" LabelPaddingLeft="5px" />
    </
    c1c:C1WebMenuItem>
    </
    Items>
    <ItemStyle Font-Bold="True" Font-Size="13px" ItemAlign="Center" />
    </
    c1c:c1webmenu>

     

    hope that helps,
    Greg L

    Filed under:
Page 1 of 1 (2 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.