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
85
WebTab control always appears on top of other controls on page
posted

Hello there... I have a WebTab control that is displaying the data successfully as implemented, but the horizontal menu above it has fly out options that appear vertically and those options are appearing behind the WebTab control, preventing the user from seeing them or selecting them. I have tried using z-index on the WebTab control and the asp:Menu control, but to no avail. Is there any way to set the WebTab control to appear at the bottom of the page stack (behind all other controls)?

Parents Reply
  • 18204
    Suggested Answer
    Offline posted in reply to Keith Posey

    Hi Keith,

    Thank you for the sample code and information.

    After running your code in Visual Studio (instead of IIS) I was able to reproduce this behavior.  After looking at your code, I saw that you have the Menu.IncludeStyleBlock property set to false.  This means the menu is not including any of its own styling and expects the page developer to provide your own styling.  According to MSDN:

    You typically set this property to false in the following situations:

    - You want to provide your own CSS definitions in order to customize the appearance of the menu. You must then provide your own block of CSS definitions in the page, or include a link to an external CSS file that contains the definitions.

    - You want to keep the default appearance but prefer to keep the generated CSS definitions in a separate file. You must then provide the file and link to it.

    When this property is set to true, the Menu automatically renders the following in the page:

    <style type="text/css">
        /* <![CDATA[ */
            #NavigationMenu img.icon { border-style:none;vertical-align:middle; }
            #NavigationMenu img.separator { border-style:none;display:block; }
            #NavigationMenu img.horizontal-separator { border-style:none;vertical-align:middle; }
            #NavigationMenu ul { list-style:none;margin:0;padding:0;width:auto; }
            #NavigationMenu ul.dynamic { z-index:1; }
            #NavigationMenu a { text-decoration:none;white-space:nowrap;display:block; }
            #NavigationMenu a.static { padding-left:0.15em;padding-right:0.15em; }
            #NavigationMenu a.popout { background-image:url("/WebResource.axd?d=fSxzh5koJfSg84Mau_awUhOf6vnWCbdAtOwGr5HnSFpkglktfIl5zIIch2ifKisQwleleboVxRN7hzCBxfG-QJJ4Mez003Kayvvz2hAfXJw1&amp;t=635589255476784022");background-repeat:no-repeat;background-position:right center;padding-right:14px; }
        /* ]]> */
    </style>

    The part that sticks out to me here is "#NavigationMenu ul.dynamic { z-index:1; }".  If this style line is included on your page when this property is false, the menu renders on top of the WebTab.  As for why you experience this in IIS and not in Visual Studio that may be related to something else.  If you include that style on the page, do you still experience the issue in IIS?  Also, are you experiencing this with any other controls besides the menu rendering behind the WebTab?

    Looking forward to hearing from you.

Children
No Data