Good morning!
More than an error I have a query with navbar (although they also occur with other situations). I'm starting a project but just happened to me that I do not understand why it happens:
My code of default.Master is like this:
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Default.master.cs" Inherits="GamblingWeb.Default" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999xhtml>
<head runat="server">
<meta charset ="utf-8" />
<meta name ="viewport" content ="width=device-width, inital scale =1" />
<title>Mundialito Cash</title>
<!---jQuery minifield Script-->
<script src="Scripts/jquery-3.3.1.min.js"></script>
<!---Bootstrap Minifield Script-->
<script src="Scripts/bootstrap.min.js"></script>
<!---CSS Minified -->
<link type ="text/css" rel ="stylesheet" href="Content/bootstrap.css" />
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
<style type="text/css">
.navtop {
font-size: medium;
text-align: center;
background: #FF0000;
}
.firma {
font-size: xx-small;
text-align: center;
background: #F78181;
}
</style>
</head>
<body>
<nav class ="navbar navbar-expand-md fixed-top">
<div classs ="container">
<p class="navtop">Holis</p>
</div>
</nav>
<nav class ="navbar navbar-expand-md fixed-bottom">
<div class="container">
<p class="firma"> Gambling Site <br> Copyright © 2018 Analisis de Sistemas I<br> IMR</p>
</div>
</nav>
<form id="form1" runat="server">
<div>
<asp:ContentPlaceHolder ID="cphDefault" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>
Add a webform with master page and I have absolutely nothing in this aspx at the moment:
<%@ Page Title="" Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true" CodeBehind="LogIn.aspx.cs" Inherits="GamblingWeb.LogIn" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphDefault" runat="server">
</asp:Content>
and check with the design to see everything well:
but when you run it in the browser it ends up looking like this:
my question is, why are these situations occurring and how to correct them? I know it is not complicated but I am still learning and I can not find a reason why it is given or how to correct it, so far the only solution I have found is to erase and do everything again and it works as it should, but I know it is not A) Yes.
Thanks for your help!