私はちょっと編集したウェブフォームテンプレート(現在aspなどを学んでいる)で使っているnav barを作成しました。いくつかのマイページでは、ドロップダウンメニューからアクセスしようとすると、ナビゲーションバーがページのコンテンツと重なって表示されます。ここ は私の問題の写真です:ここでオーバーラップnav bar css
body {
padding-top: 50px;
padding-bottom: 20px;
}
.body-content {
padding-left: 15px;
padding-right: 15px;
}
.dl-horizontal dt {
white-space: normal;
}
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="select"] {
max-width: 280px;
}
@media screen and (min-width: 768px) {
.jumbotron {
margin-top: 20px;
text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 10px 10px rgba(0,0,0,.2), 0 20px 20px rgba(0,0,0,.15);
}
}
li {
border-right: 1px solid #ff6600;
}
ul {
list-style: none;
padding: 0;
margin: 0;
background: #2B3533;
border: 1px solid #ff6600;
}
ul li {
display: block;
position: relative;
float: left;
background: #2B3533;
}
li ul {
display: none;
}
ul li a {
display: block;
padding: 1em;
text-decoration: none;
white-space: nowrap;
color: #fff;
}
li:hover > ul {
display: block;
position: absolute;
}
li:hover li {
float: none;
}
li:hover a {
background: #2B3533;
}
li:hover li a:hover {
background: #ff6600;
}
.main-navigation li ul li {
border-top: 0;
}
ul li a:hover {
background: #ff6600;
}
ul ul ul {
left: 100%;
top: 0;
}
ul:before,
ul:after {
content: " ";
display: table;
}
ul:after {
clear: both;
}
.main-navigation > li > a {
display: block;
padding: 1em;
text-decoration: none;
white-space: nowrap;
color: white;
}
.shadowing {
color: #fff;
font-size: 12em;
font-weight: bold;
font-family: Helvetica;
text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 10px 10px rgba(0,0,0,.2), 0 20px 20px rgba(0,0,0,.15);
margin-top: 20px;
}
.shadowing {
text-align: center;
}
が私のマスターページのコードです:
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="SyntherMaster.Master.cs" Inherits="ComputingProjectwh.SiteMaster" %>
<!DOCTYPE html>
<html lang="en">
<head runat="server">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><%: Page.Title %> - My ASP.NET Application</title>
<asp:PlaceHolder runat="server">
<%: Scripts.Render("~/bundles/modernizr") %>
</asp:PlaceHolder>
<webopt:bundlereference runat="server" path="~/Content/css" />
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager runat="server">
<Scripts>
<%--To learn more about bundling scripts in ScriptManager see http://go.microsoft.com/fwlink/?LinkID=301884 --%>
<%--Framework Scripts--%>
<asp:ScriptReference Name="MsAjaxBundle" />
<asp:ScriptReference Name="jquery" />
<asp:ScriptReference Name="bootstrap" />
<asp:ScriptReference Name="respond" />
<asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" />
<asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebUIValidation.js" />
<asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js" />
<asp:ScriptReference Name="GridView.js" Assembly="System.Web" Path="~/Scripts/WebForms/GridView.js" />
<asp:ScriptReference Name="DetailsView.js" Assembly="System.Web" Path="~/Scripts/WebForms/DetailsView.js" />
<asp:ScriptReference Name="TreeView.js" Assembly="System.Web" Path="~/Scripts/WebForms/TreeView.js" />
<asp:ScriptReference Name="WebParts.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebParts.js" />
<asp:ScriptReference Name="Focus.js" Assembly="System.Web" Path="~/Scripts/WebForms/Focus.js" />
<asp:ScriptReference Name="WebFormsBundle" />
<%--Site Scripts--%>
</Scripts>
</asp:ScriptManager>
<ul class="main-navigation">
<li><a href="/Home.aspx">Synther Physics</a></li>
<li><a href="/RevisionTopicList.aspx">Revision by Topic</a>
<ul>
<li><a href="/RevisionPages/1. Further Mechanics/Further Mechanics Topic List.aspx">Further Mechanics</a>
<ul>
<li><a href="/RevisionPages/1. Further Mechanics/Moments and Energy.aspx">Moments and Energy</a></li>
<li><a href="/RevisionPages/1. Further Mechanics/Motion in a Circle.aspx">Motion in a Circle</a></li>
</ul>
</li>
<li><a href="/RevisionPages/2. Gravitaional Fields/Universal Gravitation.aspx">Gravitaional Fields</a>
<ul>
<li><a href="/RevisionPages/2. Gravitaional Fields/Universal Gravitation.aspx">Universal Gravitation</a></li>
</ul>
</li>
<li><a href="/RevisionPages/3. Electric and Magnetic Fields/Electric and Magnetic Fields Topic List.aspx">Electric and Magnetic Fields</a>
<ul>
<li><a href="/RevisionPages/3. Electric and Magnetic Fields/Capacitance.aspx">Capacitance</a></li>
<li><a href="/RevisionPages/3. Electric and Magnetic Fields/Electric Fields.aspx">Electric Fields</a></li>
<li><a href="/RevisionPages/3. Electric and Magnetic Fields/Magnetic Fields.aspx">Magnetic Fields</a></li>
</ul>
</li>
<li><a href="/RevisionPages/4. Nuclear and Particle Physics/Nuclear and Particle Physics Topic List.aspx">Nuclear and Particle Physics</a>
<ul>
<li><a href="/RevisionPages/4. Nuclear and Particle Physics/Electrons and Nuceli.aspx">Electrons and Nuclei</a></li>
<li><a href="/RevisionPages/4. Nuclear and Particle Physics/Particle Physics.aspx">Particle Physics</a></li>
</ul>
</li>
<li><a href="/RevisionPages/5. Nuclear Radiation/Nuclear Decay.aspx">Nuclear Radiation</a>
<ul>
<li><a href="/RevisionPages/5. Nuclear Radiation/Nuclear Decay.aspx">Nuclear Decay</a></li>
</ul>
</li>
<li><a href="/RevisionPages/6. Thermodynamics/Thermodynamics Topic List.aspx">Thermodynamics</a>
<ul>
<li><a href="/RevisionPages/6. Thermodynamics/Gas Laws and Kinetic Theory.aspx">Gas Laws and Kinetic Theory</a></li>
<li><a href="/RevisionPages/6. Thermodynamics/Internal Energy, Absolute Zero and Change of State.aspx">Internal Energy, Absolute Zero and Change of State</a></li>
<li><a href="/RevisionPages/6. Thermodynamics/Specific Heat Capacity.aspx">Specific Heat Capacity</a></li>
</ul>
</li>
<li><a href="/RevisionPages/7. Space/Space Topic List.aspx">Space</a>
<ul>
<li><a href="/RevisionPages/7. Space/Astrophysics.aspx">Astrophysics</a></li>
<li><a href="/RevisionPages/7. Space/Cosmology.aspx">Cosmology</a></li>
</ul>
</li>
<li><a href="/RevisionPages/8. Oscillations/Oscillations.aspx">Oscillations</a>
<ul>
<li><a href="/RevisionPages/8. Oscillations/Oscillations.aspx">Oscillations</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="/RevisionTestList.aspx">Tests by Topic</a>
<ul>
<li><a href="/TestPages/1. Further Mechanics/Further Mechanics Test List.aspx">Further Mechanics</a>
<ul>
<li><a href="/TestPages/1. Further Mechanics/Moments and Energy Test.aspx">Moments and Energy</a></li>
<li><a href="/TestPages/1. Further Mechanics/Motion in a Circle Test.aspx">Motion in a Circle</a></li>
</ul>
</li>
<li><a href="/TestPages/2. Gravitaional Fields/Universal Gravitation Test.aspx">Gravitaional Fields</a>
<ul>
<li><a href="/TestPages/2. Gravitaional Fields/Universal Gravitation Test.aspx">Universal Gravitation</a></li>
</ul>
</li>
<li><a href="/TestPages/3. Electric and Magnetic Fields/Electric and Magnetic Fields Test List.aspx">Electric and Magnetic Fields</a>
<ul>
<li><a href="/TestPages/3. Electric and Magnetic Fields/Capacitance Test.aspx">Capacitance</a></li>
<li><a href="/TestPages/3. Electric and Magnetic Fields/Electric Fields Test.aspx">Electric Fields</a></li>
<li><a href="/TestPages/3. Electric and Magnetic Fields/Magnetic Fields Test.aspx">Magnetic Fields</a></li>
</ul>
</li>
<li><a href="/TestPages/4. Nuclear and Particle Physics/Nuclear and Particle Physics Test List.aspx">Nuclear and Particle Physics</a>
<ul>
<li><a href="/TestPages/4. Nuclear and Particle Physics/Electrons and Nuceli Test.aspx">Electrons and Nuclei</a></li>
<li><a href="/TestPages/4. Nuclear and Particle Physics/Particle Physics Test.aspx">Particle Physics</a></li>
</ul>
</li>
<li><a href="/TestPages/5. Nuclear Radiation/Nuclear Decay Test.aspx">Nuclear Radiation</a>
<ul>
<li><a href="/TestPages/5. Nuclear Radiation/Nuclear Decay Test.aspx">Nuclear Decay</a></li>
</ul>
</li>
<li><a href="/TestPages/6. Thermodynamics/Thermodynamics Test List.aspx">Thermodynamics</a>
<ul>
<li><a href="/TestPages/6. Thermodynamics/Gas Laws and Kinetic Theory Test.aspx">Gas Laws and Kinetic Theory</a></li>
<li><a href="/TestPages/6. Thermodynamics/Internal Energy, Absolute Zero and Change of State.aspx">Internal Energy, Absolute Zero and Change of State</a></li>
<li><a href="/TestPages/6. Thermodynamics/Specific Heat Capacity.aspx">Specific Heat Capacity</a></li>
</ul>
</li>
<li><a href="/TestPages/7. Space/Space Test List.aspx">Space</a>
<ul>
<li><a href="/TestPages/7. Space/Astrophysics Test.aspx">Astrophysics</a></li>
<li><a href="/TestPages/7. Space/Cosmology.aspx">Cosmology</a></li>
</ul>
</li>
<li><a href="/TestPages/8. Oscillations/Oscillations Test.aspx">Oscillations</a>
<ul>
<li><a href="/TestPages/8. Oscillations/Oscillations Test.aspx">Oscillations</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="/Formula Analysis.aspx">Formula Analysis</a></li>
<li><a href="/Sylabus Breakdown.aspx">Sylabus Breakdown</a></li>
<asp:LoginView runat="server" ViewStateMode="Disabled">
<AnonymousTemplate>
<ul class="nav navbar-nav navbar-right">
<li><a runat="server" href="~/Account/Register">Register</a></li>
<li><a runat="server" href="~/Account/Login">Log in</a></li>
</ul>
</AnonymousTemplate>
<LoggedInTemplate>
<ul class="nav navbar-nav navbar-right">
<li><a runat="server" href="~/Account/Manage" title="Manage your account">Hello, <%: Context.User.Identity.GetUserName() %>!</a></li>
<li>
<asp:LoginStatus runat="server" LogoutAction="Redirect" LogoutText="Log off" LogoutPageUrl="~/" OnLoggingOut="Unnamed_LoggingOut" />
</li>
</ul>
</LoggedInTemplate>
</asp:LoginView>
</ul>
<div>
<asp:ContentPlaceHolder ID="MainContent" runat="server">
</asp:ContentPlaceHolder>
<footer>
<p>© <%: DateTime.Now.Year %> - Synther Physics</p>
</footer>
</div>
</form>
</body>
</html>
Zインデックスを調べましたか? – Sablefoste
yeah iveはzのインデックスと位置を追加しようとしました:すべてのナビゲーションバークラスに関連していますが、それらのすべてでまだ –