Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
55
Vertical Alignment?
posted

How can I set the text of an item to be middle aligned vertically?  I am guessing that I can do this with the customrules property on the style, but it doesn't appear to work.  Here is my HTML for your review, and I am using 8.1.20081.1000.

             <ignav:UltraWebMenu ID="webMenu" BackColor="#000066" runat="server" BorderStyle="None" Cursor="Hand" ImageDirectory="img/" >
               <HoverItemStyle BorderStyle="None" ForeColor="Red" BackColor="#6699CC" CssClass="tophover"></HoverItemStyle>
                     <SeparatorStyle Height="1px" BorderStyle="None" BackgroundImage="ig_tab_defrr1.gif" BackColor="#6699CC" CssClass="SeparatorClass" CustomRules="background-repeat:repeat-x; "></SeparatorStyle>
                     <ExpandEffects ShadowColor="102, 153, 204" Type="Slide"></ExpandEffects>
                     <TopSelectedStyle BorderStyle="None" CssClass="TopHover"></TopSelectedStyle>
                     <IslandStyle BackColor="#000066" ></IslandStyle>
                     <DisabledStyle CssClass="DisabledClass"></DisabledStyle>
                     <TopLevelHoverItemStyle CssClass="TopHover"></TopLevelHoverItemStyle>
                     <Styles>
                        <ignav:Style Cursor="Hand" BorderStyle="None" ForeColor="White" BackColor="#000066" CssClass="TopClass" Font-Bold="true" CustomRules="vertical-align:middle;"></ignav:Style>
                        <ignav:Style Cursor="Hand" BorderStyle="None" ForeColor="Black" BackColor="#6699CC" CssClass="TopHover" Font-Bold="true" CustomRules="vertical-align:middle;"></ignav:Style>
                     </Styles>
                     <Levels>
                        <ignav:Level LevelHoverClass="TopHover" LevelClass="TopClass" Index="0"></ignav:Level>
                        <ignav:Level LevelHoverClass="TopHover" LevelClass="TopClass" Index="1"></ignav:Level>
                        <ignav:Level LevelHoverClass="TopHover" LevelClass="TopClass" Index="2"></ignav:Level>
                        <ignav:Level LevelHoverClass="TopHover" LevelClass="TopClass" Index="3"></ignav:Level>
                     </Levels>
                     <ItemStyle CssClass="topclass" Width="100%">
                        <Padding Left="10px" />
                     </ItemStyle>
                     <Images>
                        <ScrollTopImage Url="ig_menu_scrollupwhite.gif"></ScrollTopImage>              
                        <ScrollTopDisabledImage Url="ig_menu_scrollup_disabled.gif"></ScrollTopDisabledImage>
                        <ScrollBottomDisabledImage Url="ig_menu_scrolldown_disabled.gif"></ScrollBottomDisabledImage>
                        <ScrollBottomImage Url="ig_menu_scrolldownwhite.gif"></ScrollBottomImage>
                        <SubMenuImage Url="./img/arrow.gif"></SubMenuImage>
                     </Images>
            <HeaderStyle ForeColor="White" />
            <MenuClientSideEvents InitializeMenu="" ItemChecked="" ItemClick="" ItemHover="" SubMenuDisplay="" />
         </ignav:UltraWebMenu>

 

Thanks,

Rob

Parents
No Data
Reply
  • 4493
    posted

    Hi Rob,
    You are right you could achieve that by applying custom CSS classes. Unfortunatelly the provided HTML is not enough, because we can't see the CSS declarations (for example the TopClass), nor we have the images stated in the definitions. One thing that I see is that you are once referencing TopClass (in levels declaration), and once you are referencing topclass (in ItemStyle declaration). Although CSS is supposed to be case-insensitive, we suggest that you keep consistance between class definitions within a stylesheet and class names used in markup.

    Having in mind that provided markup does not have any items defined, I tried adding some and I see that text is centered vertically. But I also added a Height definition to the ItemStyle.

    Hope this helps!

Children