submenuitems goes behind controls

rish.baranwal

Member
Joined
Mar 9, 2010
Messages
6
Programming Experience
Beginner
my submenuitems of menu is goes back behind the contrls plz provide me correct solution to prevent such happenings............
 
you can solve this using CSS.
simply set the z-index of your menu to something like 50 and it should solve your issue.
 
submenu items goes behind the controls

the solution given by you is not solve my problem
the problem is my submenus goes behind the controls
you reply me to set the z-index of menu items somewhat 50 or more
but the solution not work
please provide me the full code
or any other solution





thank you
 
can you post your code so I can see the error in action?
 
submenus goes back to controls

<asp:Menu ID="Menu1" runat="server" BackColor="PaleTurquoise" BorderColor="#6E2409"
BorderWidth="3px" Font-Bold="True" Font-Names="Verdana"
Font-Size="Small" Font-Strikeout="False" Font-Underline="False" ForeColor="#6E2409"
Height="6px" Orientation="Horizontal" StaticSubMenuIndent="8px" Style="font-size: 13pt;
z-index: 150; left: 0px; position: absolute; top: 193px; background-color: #ffffff"
Width="917px" >
<StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
<DynamicHoverStyle BackColor="#990000" ForeColor="White" />
<DynamicMenuStyle BackColor="#FFFBD6" />
<StaticSelectedStyle BackColor="#FFCC66" />
<DynamicSelectedStyle BackColor="#FFCC66" />
<DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
<Items>
<asp:MenuItem NavigateUrl="~/Home1.aspx" Text="Home" Value="Home"></asp:MenuItem>
<asp:MenuItem Text="Flights" Value="Flights">
<asp:MenuItem NavigateUrl="http://www.yatra.com/YT/airlines/index.html" Text="Domestic"
Value="Domestic"></asp:MenuItem>
<asp:MenuItem NavigateUrl="http://www.yatra.com/international/YT/airlines/international.html"
Text="International" Value="International"></asp:MenuItem>
</asp:MenuItem>
<asp:MenuItem Text="Packages" Value="Packages">
<asp:MenuItem Text="Inbound Packages" Value="Inbound Packages"></asp:MenuItem>
<asp:MenuItem Text="Outbound Packages" Value="Outbound Packages"></asp:MenuItem>
<asp:MenuItem Text="Wildlife Packages" Value="Wildlife Packages"></asp:MenuItem>
<asp:MenuItem Text="Honeymoon Packages" Value="Honeymoon Packages"></asp:MenuItem>
</asp:MenuItem>
<asp:MenuItem Text="Railways" Value="Railways">
<asp:MenuItem NavigateUrl="http://www.indianrail.gov.in/" Text="Domestic" Value="Domestic">
</asp:MenuItem>
<asp:MenuItem Text="International" Value="International"></asp:MenuItem>
</asp:MenuItem>
<asp:MenuItem Text="Travel Agencies" Value="Travel Agencies"></asp:MenuItem>
<asp:MenuItem Text="Hotels" Value="Hotels">
<asp:MenuItem Text="Domestic" Value="Domestic"></asp:MenuItem>
<asp:MenuItem Text="International" Value="International"></asp:MenuItem>
</asp:MenuItem>
<asp:MenuItem Text="Routes" Value="Routes">
<asp:MenuItem Text="With in Territory" Value="With in Territory"></asp:MenuItem>
<asp:MenuItem Text="Abroad" Value="Abroad"></asp:MenuItem>
</asp:MenuItem>
<asp:MenuItem Text="Cars" Value="Cars"></asp:MenuItem>
<asp:MenuItem Text="Buses" Value="Buses"></asp:MenuItem>
<asp:MenuItem Text="Cruises" Value="Cruises"></asp:MenuItem>
<asp:MenuItem Text="City Guides" Value="City Guides"></asp:MenuItem>
<asp:MenuItem Text="Bookings Enquiry" Value="New Item">
<asp:MenuItem Text="User" Value="Enquiry"></asp:MenuItem>
<asp:MenuItem Text="Admin" Value="Admin"></asp:MenuItem>
</asp:MenuItem>
</Items>
<StaticHoverStyle BackColor="#9CBEFF" ForeColor="Tomato" />
</asp:Menu>
                       
                 
<asp:ImageButton ID="ImageButton17" runat="server" Height="20px" ImageUrl="~/images/icons/flag_de.gif"
Style="z-index: 102; left: 1002px; position: absolute; top: 32px" Width="43px" />
<asp:Label ID="Label12" runat="server" Font-Bold="True" ForeColor="White" Height="15px"
Style="z-index: 103; left: 865px; position: absolute; top: 81px" Text="MOBILE 08004164717"
Width="174px"></asp:Label>
<asp:Label ID="Label13" runat="server" Font-Bold="True" Height="15px" Style="z-index: 104;
left: 866px; position: absolute; top: 62px" Text="Civilines, Allahabad, UP"
Width="174px"></asp:Label>
<asp:Image ID="Image1" runat="server" Height="114px" ImageUrl="~/images/Logo/LOGO20.png"
Style="z-index: 105; left: 2px; position: absolute; top: 0px" Width="342px" />
 
ok, if you look at your controls, you have set the style to set the z-index as 102, 103, 105, etc....but you have not set the z-index of your menu items.
Setting the z-index of the menu itself is not enough, because that is just the container of the menu items.
That is forcing your controls to be infront of your menu.

So, you need to remove all the z-indexes and if you are still have issues, apply z-index to your menu items only.

I hope that helps.
 
submenus items goes back to controls

you have suggested to set the z-index of submenuitems somewhat 50 but there is no style option shows in the menuitems ...........please send me the valid code or modify my own code and send me
 
taking input from html text control

sir please provide me the solution for taking input from the html text control and use it in vb(asp.net) code window,i am kindly delightful if u send me the code as well
 
just because intellisense does not auto complete your inline css, it does not mean you can't use it.
Remember, all controls have to be rendered in HTML in some way (Panels become divs, labels become spans, etc) so just write your z-index on the actual menuitems, i.e.:

VB.NET:
<asp:MenuItem style="z-index: 50;" NavigateUrl="~/Home1.aspx" Text="Home" Value="Home" />

and that should work.
 
i want login like rediffmail

sir,in rediffmail the backside web page disappear when login box appear on the screen so have u code to do that.............plzzzzzz reply immediately
 
Back
Top