Hello forum,
I have a <div class=”row”></div> and inside it are two other divs that are in the same row. The content of the first div is a canvas control and is displayed on the left of the screen while the content of the other div appears on the right.
In a smaller screen, I wanted the right div to move down the left div. but when I minimize the window, the content of the right div moves behind the content of the left div. Or alternatively, the content of the right div can be made to disappear.
I thought that when contents are inside a <div class=“row”></div> they will be responsive in smaller screens. From my HTML below, it will show the display when used.
Here is my full HTML
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Invoice upload</title>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<link href='https://fonts.googleapis.com/css?family=Comfortaa' rel='stylesheet' />
<link href='https://fonts.googleapis.com/css?family=Nunito' rel='stylesheet' />
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<!-- Popper JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<!-- Bootstrap CSS CDN -->
<link href="css/bootstrap.css" rel="stylesheet" />
<link href="css/bootstrap.min.css" rel="stylesheet" />
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous" />
<!-- Our Custom CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" />
<!-- Scrollbar Custom CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/malihu-custom-scrollbar-plugin/3.1.5/jquery.mCustomScrollbar.min.css" />
<!-- Font Awesome JS -->
<script defer src="https://use.fontawesome.com/releases/v5.0.13/js/solid.js" integrity="sha384-tzzSw1/Vo+0N5UhStP3bvwWPq+uvzCMfrN1fEFe+xBmv1C/AtVX5K0uZtmcHitFZ" crossorigin="anonymous"></script>
<script defer src="https://use.fontawesome.com/releases/v5.0.13/js/fontawesome.js" integrity="sha384-6OIrr52G08NpOFSZdxxz1xdNSndlD4vdcf/q2myIUVO0VsqaGHJsB0RaBE01VTOY" crossorigin="anonymous"></script>
<!-- Font Awesome JS -->
<script type="text/javascript" src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/1.10.9/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/responsive/1.0.7/js/dataTables.responsive.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/1.10.9/js/dataTables.bootstrap.min.js"></script>
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var $winwidth = $(window).width();
$("#the-canvas").attr({
width: $winwidth
});
$(window).bind("resize", function(){
var $winwidth = $(window).width();
$("#the-canvas").attr({
width: $winwidth
});
});
});
</script>
</head>
<body style="font-family: Constantia; background-color: #eeeeee;">
<form id="form1" runat="server" enctype="multipart/form-data" method="POST">
<div class="wrapper">
<!-- Sidebar -->
<nav id="sidebar">
<ul class="list-unstyled components">
<li><a><asp:Label ID="named" runat="server" Font-Size="10pt" Text="" ForeColor="White"></asp:Label></a></li>
<li><a><img alt="" src="images/navbarimg/user-8-xxl.png" height="13"/> <asp:Label ID="user" runat="server" Font-Size="8pt" Text="" ForeColor="White"></asp:Label></a></li>
<li><a><img alt="" src="images/wallet-xxl.png" height="12" /> <asp:Label ID="Units" runat="server" Font-Names="Comfortaa" Font-Size="8pt" Text="" ForeColor="White"></asp:Label></a></li>
</ul>
<ul class="list-unstyled components">
<li><a href="#">Home</a></li>
<li><a href="#">1st Document</a></li>
<li><a href="#">1st Document</a></li>
<li><a href="#">1st Document</a></li>
<li><a href="#">1st Document</a></li>
</ul>
<ul class="list-unstyled components">
<li id="dashboard" runat="server"><a href="#">Profile</a></li>
<li id="Li1" runat="server"><a href="#"> Details</a></li>
</ul>
</nav>
<div id="content" style="font-size: 10pt;">
<nav id="topnav" class="navbar navbar-expand-lg navbar-default navbar-inverse navbar-fixed-top" role="navigation" style="background-color: #eeeeee; font-size: small; font-family: Nunito;">
<div class="container-fluid">
<button type="button" id="sidebarCollapse" class="btn btn-info">
<i class="fas fa-align-left"></i>
<span class="sr-only">Toggle Navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<h3 style="font-size: medium; font-weight: bolder; font: bolder; color: #00003D;">codex</h3>
<button class="btn btn-info d-lg-none ml-auto" id="sideCollapse" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<i class="fas fa-align-justify"></i>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="nav navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="Index.aspx" style="font-weight: bolder;">Home</a>
</li>
</ul>
</div>
</div>
</nav>
<hr />
<br />
<div class="line"></div>
<asp:Label ID="labelid" runat="server" Text=""></asp:Label><asp:Label ID="createby" runat="server" Text=""></asp:Label><asp:Label ID="role" runat="server" Text=""></asp:Label>
<div class="container" id="centered" style="margin-top: -2%; font-family: Nunito;">
<div class="form-horizontal">
<h1 style="font-size: small; margin-top: 0%; color: red;">ID Card with QR Code</h1>
<hr />
<div class="row">
<div class="mid-cont">
<br />
<div class="containr-fluid">
<asp:FileUpload runat="server" ID="showPreviewBill" />
<br /><br />
</div>
<div class="contentt">
<canvas id="the-canvas" style="border: 1px solid grey; height: 850px; width: 700px;"></canvas>
</div>
<asp:Button ID="buttonmail" runat="server" CssClass="btn btn-primary navbar-btn" BackColor="SteelBlue" Font-Size="9pt" Text="QR code" />
</div>
<div class="sidecontent" style="width: 25%;">
<div class="topcont" style="background-color: #fff; width:100%;">
<p>Invoice document can also be created and authenticated with the use of the embedded template. </p>
<i id="info" class="fa fa-info-circle"></i>
</div>
<div class="bottomcont" style="width:100%;">
<p> Invoice document can also be created and authenticated with the use of the embedded template. </p>
<i id="info1" class="fa fa-question-circle" aria-hidden="true"></i>
<p> Invoice document can also be created and authenticated with the use of the embedded template. </p>
<i id="info2" class="fa fa-question-circle" aria-hidden="true"></i>
<p> Invoice document can also be created and authenticated with the use of the embedded template. </p>
</div>
</div>
</div>
<asp:Label ID="lblMessage" runat="server" Text=""></asp:Label>
</div>
</div>
<br />
<!-- Footer -->
<footer class="page-footer font-small bg-light" style="background-color: #D1D1D1; font-family: Nunito; max-width: 100%; margin-bottom: 0%;">
<hr />
<div class="footer-copyright text-center py-3" style="font-size: 8pt;">
© Copyright <%=DateTime.Now.Year %> <a href="#" style="font-weight:bold; color:#00003D; font-size:10pt;">joscode.com</a>
</div>
</footer>
<!-- Footer -->
</div>
</div>
</form>
</body>
</html>