Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MasterPage - some menu items appear below the content

Status
Not open for further replies.

randysmid

Programmer
Dec 12, 2001
801
US
Hi,
As most of you know, all menus in the past would appear on top of any underlying content. However, this doesn't appear to be true in ASP.Net 2.0.

Does anyone have a suggestion on how to make this menu act like a normal one?

TIA, Randy Smith
 
Put the menu in the area you want it to appear on the master page. Post your code so we can take a look if you want.
 
That doesn't make much sense to me (as there's so such thing as a "normal menu").

A "menu" could have been any type of HTML element (e.g <ul>, <table>, <p> etc). It's positioning can be determined by using CSS and it will only be positioned where you set it. It has no concept of being on "top" unless you tell it to.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
ca8msm,
Sorry for any confusion, but I placed the menu on the MasterPage in ASP.Net 2.0. If the menu has too many items, the lowest items in the menu will appear under the content page. Can you try it out yourself?
TIA, Randy
 
Hi,
Here is the html for the MasterPage.Master:

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="Large" ForeColor="Blue"
Height="26px" Style="z-index: 100; left: 150px; position: absolute; top: 6px" Text=" CTA Office Services - General Work Order System"
Width="486px"></asp:Label>
<br />
<asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1" Width="70px">
<StaticMenuItemStyle BorderStyle="Solid" ForeColor="Red" />
</asp:Menu>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
<hr />
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>


TIA, Randy
 
Unfortunately, that doesn't help. The reason why it does that has nothing to do with ASP.NET as it is the HTML and CSS that affects the positioning. I suggest you use the View Source of your web browser and paste the contents into a thread in the HTML forum and they will tell you why it is happening.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Hi,
It turned out that the "z-index" property of my content page controls were set starting at 101. After removing them, the menu now appears on top of the content page.
TIA, Randy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top