my scrollspy isn't working properly. It starts at home and can scroll down but when scrolling back up all tabs highlight except the "home" tab when you scroll all the way up. Additionally I've tried to include the data-bs-offset= "100" in my body tag but that has no effect on the scrolling. The tab changes to the next too early so I wanted to fix this with data-bs-offset. I'm pretty sure i've included the necessary cdn links for the css and js from the bootstrap website. Any suggestions?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<script src="https://kit.fontawesome.com/8caef0b63d.js" crossorigin="anonymous"></script>
<link href="https://fonts.googleapis.com/css2?family=Quicksand:wght#300;400;500;600;700&display=swap" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.2.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor" crossorigin="anonymous">
<link rel="stylesheet" href="css/styles.css">
<title>Tatyana Chalik</title>
</head>
<body data-bs-spy="scroll" data-bs-target=".navbar" data-bs-smooth-scroll="true">
<!-- navbar -->
<nav class="navbar navbar-dark navbar-expand-lg fixed-top">
<div class="container-fluid">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarTogglerDemo02" aria-controls="navbarTogglerDemo02" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarTogglerDemo02">
<ul class="navbar-nav mx-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link px-lg-3 active" aria-current="page" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link px-lg-3" href="#about">About</a>
</li>
<li class="nav-item">
<a class="nav-link px-lg-3" href="#projects">Projects</a>
</li>
<li class="nav-item">
<a class="nav-link px-lg-3" href="#contact">Contact</a>
</li>
<li class="nav-item">
<a class="nav-link px-lg-3" href="resume.html">Resume</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- /navbar -->
<header id="home">
<h1> hi </h1>
</header>
<main>
<div class="container" id="about">
<h2 class="pt-5 pb-4 text-center">About Me</h2>
<p class="pt-5 text-center"> jsdklajsdfljsdalkfjsdljflsdjflsdfljdf </p>
</div>
<div class="container" id="projects">
<h2>hi2</h2>
</div>
<div class="container contacts" id="contact">
<h2 class="text-center pt-5 pb-3">Contact Me</h2>
</div>
</main>
<footer>
</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.2.0-beta1/dist/js/bootstrap.bundle.min.js" integrity="sha384-pprn3073KE6tl6bjs2QrFaJGz5/SUsLqktiwsUTF55Jfv3qYSDhgCecCxMW52nD2" crossorigin="anonymous"></script>
<script src="js/app.js"></script>
</body>
</html>
Hello I found some similarity case with your case. And I try to help you with send the link below. You can read and choose the one which the case is close to your case. Thank you, hope it can help you. bootstrap offset scrollspy not working or How do I set the offset for ScrollSpy in Bootstrap? or this one data-offset in Bootstrap Scrollspy is not offseting at all
I am trying to build a responsive website with bootstrap 4 that shows the sidebar links as a button toggle. My current implementation, when reduce to mobile screen dimensions, shows the sidebar links at the top of the page. Appreciate any help in converting them to a toggle.
Below is my html code:
<!DOCTYPE html>
<html lang="en-US"><head>
<link rel="stylesheet" href="https://themes.getbootstrap.com/wp-content/themes/bootstrap-marketplace/style.css?ver=1590611604">
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
</head>
<body class="page-template-default page page-id-49440 woocommerce theme-dokan woocommerce-js dokan-theme-dokan">
<main id="main" class="site-main main">
<section class="section">
<div class="container">
<div class="row">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#nav123" aria-controls="nav123" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<section class="section pt-10 mt-md-10">
<div id="the-guide" class="container-fluid">
<div class="row justify-content-between pb-0 pb-lg-2" >
<!--<div class="col-md-3 col-xl-2 d-none d-lg-block" id="inside">-->
<div class="col-md-2 col-xl-3" id="inside">
<ul id="nav123" class=" nav flex-column ">
<li class="nav-item nav-item-heading">
Theme 1
</li>
<li class="{{ 'active' if active_page == 'page1' else '' }}" >
Page 1
</li>
<li class="{{ 'active' if active_page == 'page2' else '' }}" >
Page 2
</li>
</ul>
</div>
<div class="col-lg-9 mb-4 mb-lg-0 order-lg-2">
<h2> this is a test</h2>
</div>
</div>
</div>
</section>
</div>
</div>
</section>
</main>
<style>
.pagelink{
color: hotpink;
}
.active {
font-weight: bold;
<!--background-color: lightgray;-->
}
</style>
</body>
</html>
An example implementation where a navbar was converted to a button navbar toggle is below:
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Net Ninja Pro - the Book</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.0.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
<style>
section{
padding: 60px 0;
}
</style>
</head>
<body>
<!-- navbar -->
<nav class="navbar navbar-expand-md navbar-light pt-5 pb-4">
<div class="container-xxl">
<!-- navbar brand / title -->
<a class="navbar-brand" href="#intro">
<span class="text-secondary fw-bold">
Net Ninja Pro - the Book
</span>
</a>
<!-- toggle button for mobile nav -->
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#main-nav" aria-controls="main-nav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<!-- navbar links -->
<div class="collapse navbar-collapse justify-content-end align-center" id="main-nav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="#topics">About The Book</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#reviews">Reviews</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#contact">Get in Touch</a>
</li>
<li class="nav-item d-md-none">
<a class="nav-link" href="#pricing">Pricing</a>
</li>
<li class="nav-item ms-2 d-none d-md-inline">
<a class="btn btn-secondary" href="#pricing">buy now</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- main image & intro text -->
<section id="intro">
<div class="container-lg">
<div class="row g-4 justify-content-center align-items-center">
<div class="col-md-5 text-center text-md-start">
<h1>
<div class="display-2">Black-Belt</div>
<div class="display-5 text-muted">Your Coding Skills</div>
</h1>
<p class="lead my-4 text-muted">Lorem ipsum dolor sit amet consectetur adipisicing elit. Laboriosam, dignissimos?</p>
Buy Now
</div>
<div class="col-md-5 text-center d-none d-md-block">
<img src="/assets/ebook-cover.png" class="img-fluid" alt="ebook">
</div>
</div>
</div>
</section>
<!-- pricing plans -->
<!-- topics at a glance -->
<!-- reviews list -->
<!-- contact form -->
<!-- get updates / modal trigger -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.0.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4" crossorigin="anonymous"></script>
</body>
I have tried multiple things that I have read trying to correct this issue, the big one that I've seen says that when you load you will see an error in the console, there is no error so I don't believe that one is my problem. My navbar will collapse as the screen gets smaller, but when you click on the hamburger nothing happens.
Here is my HTML
<!DOCTYPE html>
<html lang="en" class="index">
<head>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js#1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" >
<link href="https://fonts.googleapis.com/css?family=Arvo:700|Permanent+Marker" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="portfolio.css">
<link rel="icon" type="image/png" sizes="16x16" href="./assets/favicon-16x16.png">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<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>Alice Frazier's Portfolio</title>
</head>
<body>
<nav class="navbar navbar-expand-md navbar-dark sticky-top">
<div class="container-fluid">
<div class="d-none d-lg-block center">
<p class="navbar-brand d-none d-lg-block nav-quote">"She believed she could so she did." -R.S. Grey
</p>
</div>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse">
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item"><a class="nav-link" href="index.html">Home</a></li>
<li class="nav-item"><a class="nav-link" href="#aboutmelink">About Me</a></li>
<li class="nav-item"><a class="nav-link" href="index.resume.html">My Resume</a></li>
<li class="nav-item"><a class="nav-link" href="index.projects.html">My Projects</a></li>
<li class="nav-item"><a class="nav-link" href="index.resume.html.html">Contact Me</a></li>
</ul>
</div>
</div>
</nav>
<div class="container-fluid">
<p class="name">Alice Frazier</p>
<p class="web">Web Design</p>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-md-6">
<img class="mypic" src="./assets/Alice.jpg" width="500" height="600">
</div>
<div class="col-md-6">
<img class="aboutmepic" src="./assets/alice2.jpg" width="350" height="450">
</div>
</div>
</div>
<div class="container-fluid">
<p class="web" id="aboutmelink"> About Me</p>
<p class="aboutme">Currently living and working in Indianapolis, IN. I previously worked for Dominion Dealer Solutions
and started there as website tech support, which I loved doing, unfortunately our website team was dissolved and
we no longer hosted websites so my next step was to support our CRM.</p>
<br>
<p class="aboutme">For two years I was a teacher at Sylvan Learning Center where I taught the Lego Robotics class and the Tynker Coding class. If you would like more information on these programs check them out at the links below.</p>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-md-4 home">
<p class="title">Sylvan Learning Center</p>
<a class="sylvan" href="https://www.sylvanlearning.com/" target="_blank"><img
src="./assets/sylvan_home_logo.png"
height="200" width="200"></a>
</div>
<div class="col-md-4 home">
<p class="title">Lego </p>
<a class="Lego"
href="https://www.sylvanlearning.com/stem/robotics-science"
target="_blank"><img
src="./assets/lego.jpg"
height="200" width="200"></a>
</div>
<div class="col-md-4 home">
<p class="title">Tynker</p>
<a class="Tynker" href="https://www.tynker.com/?t=reset" target="_blank"><img
src="./assets/tynker.png"
height="200" width="300"></a>
</div>
</div>
</div>
<br>
<div class="icon">
<i class="fa fa-github-square" style="font-size:48px"> </i>
<i class="fa fa-linkedin-square" style="font-size:48px"> </i>
</div>
<footer class="footer">
<div class="container-fluid padding">
<div class="row text-center">
<div class="col-md-4">
<p>Alice Frazier</p>
</div>
<div class="col-md-4">
halliwell2046#yahoo.com
</div>
<div class="col-md-4">
(317)313-7712
</div>
</div>
</div>
</footer>
</body>
</html>
Try this. The main thing here is Navigation bar. I haven't changed the rest. It seems that your markup was not in proper order. I have solved it for you.
Also I have used scripts from your question. I haven't changed their order.
Run the code Snippet
<!DOCTYPE html>
<html lang="en" class="index">
<head>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js#1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css?family=Arvo:700|Permanent+Marker" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="portfolio.css">
<link rel="icon" type="image/png" sizes="16x16" href="./assets/favicon-16x16.png">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<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>Alice Frazier's Portfolio</title>
</head>
<body>
<nav class="navbar navbar-expand-md bg-dark navbar-dark">
<a class="navbar-brand" href="#">Navbar</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="collapsibleNavbar">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">About Me</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">My Resume</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">My Projects</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Contacts</a>
</li>
</ul>
</div>
</nav>
<div class="container-fluid">
<p class="name">Alice Frazier</p>
<p class="web">Web Design</p>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-md-6">
<img class="mypic" src="./assets/Alice.jpg" width="500" height="600">
</div>
<div class="col-md-6">
<img class="aboutmepic" src="./assets/alice2.jpg" width="350" height="450">
</div>
</div>
</div>
<div class="container-fluid">
<p class="web" id="aboutmelink"> About Me</p>
<p class="aboutme">Currently living and working in Indianapolis, IN. I previously worked for Dominion Dealer Solutions and started there as website tech support, which I loved doing, unfortunately our website team was dissolved and we no longer hosted websites so my
next step was to support our CRM.</p>
<br>
<p class="aboutme">For two years I was a teacher at Sylvan Learning Center where I taught the Lego Robotics class and the Tynker Coding class. If you would like more information on these programs check them out at the links below.</p>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-md-4 home">
<p class="title">Sylvan Learning Center</p>
<a class="sylvan" href="https://www.sylvanlearning.com/" target="_blank"><img src="./assets/sylvan_home_logo.png" height="200" width="200"></a>
</div>
<div class="col-md-4 home">
<p class="title">Lego </p>
<a class="Lego" href="https://www.sylvanlearning.com/stem/robotics-science" target="_blank"><img src="./assets/lego.jpg" height="200" width="200"></a>
</div>
<div class="col-md-4 home">
<p class="title">Tynker</p>
<a class="Tynker" href="https://www.tynker.com/?t=reset" target="_blank"><img src="./assets/tynker.png" height="200" width="300"></a>
</div>
</div>
</div>
<br>
<div class="icon">
<i class="fa fa-github-square" style="font-size:48px"> </i>
<i class="fa fa-linkedin-square" style="font-size:48px"> </i>
</div>
<footer class="footer">
<div class="container-fluid padding">
<div class="row text-center">
<div class="col-md-4">
<p>Alice Frazier</p>
</div>
<div class="col-md-4">
halliwell2046#yahoo.com
</div>
<div class="col-md-4">
(317)313-7712
</div>
</div>
</div>
</footer>
</body>
</html>
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title> ARPIT - Accounting & Reconciliation Portal of Indirect Taxes </title>
<!-- Fonts -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
#*<link href="~/Content/theme/assets/global/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" />*#
<!-- Custom CSS -->
<link href="~/Content/theme/assets/admin/css/custom_website.css" rel="stylesheet" />
<!-- Bootstrap Core CSS -->
<link href="~/Content/theme/assets/global/plugins/bootstrap/css/bootstrap.css" rel="stylesheet" />
<script src="~/Scripts/jquery.js"></script>
<!-- HTML5 Shim and Respond.js 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="~/Content/theme/assets/global/plugins/html5shiv.js"></script>
<script src="~/Content/theme/assets/global/plugins/respond.min.js"></script>
<![endif]-->
</head>
<body id="content">
<div class="page-wrap ">
<header id="header" style="min-height: 163px;">
<div class="header-body" style="top: 0px;">
<div class="header-top">
<div class=" container-xl container">
<div class="top-responsive-menu">
<div class="top-menu-area">
<ul class=" nav navbar-nav top-menu-4">
<li class="login">
<i class="fa fa-user"></i> #CGA.CPSMS.BusinessModels.ResourceFiles.CBEC_Website_Content.resLoginMenu
</li>
</ul>
</div>
<div class="top-menu-area ">
#CGA.CPSMS.BusinessModels.ResourceFiles.CBEC_Website_Content.resColorThemeMenu <i class="fa fa-caret-down top -menu-3"></i>
<ul class=" nav navbar-nav top-menu menu-3 ">
<li class="dropdown">
<a href="#" data-toggle="dropdown" class="dropdown-toggle">
<img src="~/Images/multicolor.png" style="width:25px" title="Color Theme" alt="Color Theme">
</a>
<ul class="dropdown-menu multicolors-name">
<li>#CGA.CPSMS.BusinessModels.ResourceFiles.CBEC_Website_Content.resGreenThemeMenu</li>
<li>#CGA.CPSMS.BusinessModels.ResourceFiles.CBEC_Website_Content.resBlueThemeMenu</li>
</ul>
</li>
<li>#CGA.CPSMS.BusinessModels.ResourceFiles.CBEC_Website_Content.resWhiteThemeMenu</li>
<li>#CGA.CPSMS.BusinessModels.ResourceFiles.CBEC_Website_Content.resBlackThemeMenu</li>
</ul>
</div>
<div class="top-menu-area">
<ul class=" nav navbar-nav top-menu-2 ">
<li class="language menu-2" title="हिन्दी">#CGA.CPSMS.BusinessModels.ResourceFiles.CBEC_Website_Content.resLanguageMenu</li>
</ul>
</div>
<div class="top-menu-area">
#CGA.CPSMS.BusinessModels.ResourceFiles.CBEC_Website_Content.resZoomMenu <i class="fa fa-caret-down"></i>
<ul class=" nav navbar-nav top-menu menu-1 top-menu-1">
<li>#CGA.CPSMS.BusinessModels.ResourceFiles.CBEC_Website_Content.resIncreaseFontMenu </li>
<li><a class="zoom" href="#" title="Reset Font Size" style="padding: 6px 14px 6px 3px;" onclick=resetFont()>#CGA.CPSMS.BusinessModels.ResourceFiles.CBEC_Website_Content.resResetFontMenu</a></li>
<li style="margin-right:20px"><a class="zoom " href="#" title="Decrease Font Size" onclick=decreaseFont() style=" padding: 6px 14px 6px 3px;"> #CGA.CPSMS.BusinessModels.ResourceFiles.CBEC_Website_Content.resDecreaseFontMenu </a></li>
</ul>
</div>
<div class="clearfix"></div>
</div>
<!-- <p class="welcome-msg">DEFAULT WELCOME MSG!</p> -->
</div>
</div>
<div class="header-container container container-xl">
<div class="header-row">
<div class="header-column">
<div class="header-logo">
<a href="#Url.Action("Index", "HomePage", null)">
<img alt="ARPIT" class="logo" src="~/images/arpit_logo.png" title="Accounting & Reconciliation Portal of Indirect Taxes">
</a>
</div>
</div>
<div class="header-column">
<div class="header-logo govt-authorities-name">
<img alt="CCA & CBEC" title="CCA & CBIC" height="76" src="~/Images/govt-authorities.png">
</div>
</div>
</div>
</div>
<nav class="navbar navbar-inverse navbar-fixed -top header-container header-nav" role="navigation">
<div class="container container-xl responsive-padding-menu">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="clearfix"></div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav nav-pills responsive-nav navigation">
<li class="menuSelect" id="Index">
<a href="#Url.Action("Index", "HomePage", null)" title="Home">
#CGA.CPSMS.BusinessModels.ResourceFiles.CAS_Resource.Home
</a>
</li>
<li class="dropdown-submenu menuSelec t" id="AboutUs">
<a href="#" title="About Us" class="dropdown-toggle " data-toggle="dropdown">
#CGA.CPSMS.BusinessModels.ResourceFiles.CAS_Resource.AboutUs <b class="caret"></b>
</a>
<ul class="about-dropdown-menu dropdown-menu ">
<li id="Overview">#CGA.CPSMS.BusinessModels.ResourceFiles.CBEC_Website_Content.resOverviewMenu </li>
<li id="OrganisationChart">#CGA.CPSMS.BusinessModels.ResourceFiles.CBEC_Website_Content.resOrganisationChartMenu</li>
<li id="OrganisationFunctions">#CGA.CPSMS.BusinessModels.ResourceFiles.CBEC_Website_Content.resAboutUsOrganisationFunctionMenu</li>
<li id="DirectoryofOfficers">#CGA.CPSMS.BusinessModels.ResourceFiles.CBEC_Website_Content.resAboutUsDirectoryofOfficersMenu</li>
</ul>
</li>
<li class="menuSelect" id="Administration">
<a href="#Url.Action("Administration", "StaticPage", null)" title="Administration">
#CGA.CPSMS.BusinessModels.ResourceFiles.CBEC_Website_Content.resAdministrationMenu
</a>
</li>
<li class="menuSelect" id="PAO">
<a href="#Url.Action("PAO", "StaticPage", null)" title="PAO">
#CGA.CPSMS.BusinessModels.ResourceFiles.CBEC_Website_Content.resPAOMenu
</a>
</li>
<li class="menuSelect" id="DDODirectory">
<a href="#Url.Action("DDODirectory", "StaticPage", null)" title="DDO Directory">
#CGA.CPSMS.BusinessModels.ResourceFiles.CBEC_Website_Content.resDDODirectoryMenu
</a>
</li>
<li class="menuSelect" id="ListofAuthorisedBanks">
<a href="#Url.Action("ListofAuthorisedBanks", "StaticPage", null)" title="List of Authorised Banks">
#CGA.CPSMS.BusinessModels.ResourceFiles.CBEC_Website_Content.resListofAuthorisedBanksMenu
</a>
</li>
<li class="menuSelect" id="Publication">
<a href="#Url.Action("Publication", "StaticPage", null)" title="Publication">
#CGA.CPSMS.BusinessModels.ResourceFiles.CBEC_Website_Content.resPublicationMenu
</a>
</li>
<li class="menuSelect" id="Tender">
<a href="#Url.Action("Tender", "StaticPage", null)" title="Tender">
#CGA.CPSMS.BusinessModels.ResourceFiles.CBEC_Website_Content.resTenderMenu
</a>
</li>
<li class="menuSelect" id="ContactUs">
<a href="#Url.Action("ContactUs", "StaticPage", null)" title="Contact Us">
#CGA.CPSMS.BusinessModels.ResourceFiles.CBEC_Website_Content.resContactUsMenu
</a>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
</div>
</header>
#RenderBody()
</div>
<footer id="footer">
<div class="footer-link">
<div class="container container-xl">
<div class="bottomNav">
<nav>
<ul class=" bottomnavControls social-icons">
<li class="footer-image"><i class="fa fa-sitemap footer-icon"></i>#CGA.CPSMS.BusinessModels.ResourceFiles.CBEC_Website_Content.resSitemapMenu </li>
<li class="footer-image"><i class="fa fa-comments footer-icon"></i>#CGA.CPSMS.BusinessModels.ResourceFiles.CBEC_Website_Content.resFeedbackMenu </li>
<li class="footer-image"><i class="fa fa-question-circle-o footer-icon"></i>#CGA.CPSMS.BusinessModels.ResourceFiles.CBEC_Website_Content.resFAQMenu </li>
<li class="footer-image"><i class="fa fa-users footer-icon"></i> #CGA.CPSMS.BusinessModels.ResourceFiles.CBEC_Website_Content.resRTIMenu </li>
<li class="footer-image"><i class="fa fa-exclamation-triangle footer-icon "></i>#CGA.CPSMS.BusinessModels.ResourceFiles.CBEC_Website_Content.resDisclaimerMenu </li>
<li class="footer-image"><i class="fa fa-pencil footer-icon"></i>#CGA.CPSMS.BusinessModels.ResourceFiles.CBEC_Website_Content.resTermsofUseMenu </li>
<li class="footer-image"><i class="fa fa-wheelchair footer-icon "></i>#CGA.CPSMS.BusinessModels.ResourceFiles.CBEC_Website_Content.resAccessibilityStatementMenu </li>
<li class="footer-image"><i class="fa fa-file-text-o footer-icon"></i>#CGA.CPSMS.BusinessModels.ResourceFiles.CBEC_Website_Content.resWebsitePoliciesMenu</li>
</ul>
</nav>
</div>
</div>
<div class="footer-copyright">
<div class="container">
<p class="copyright-text" title="© Content Owned, Updated & Maintained by O/o Pr. CCA , Central Board of Indirect Taxes & Customs, Department of Revenue, Ministry of Finance, Government of India">© Content Owned, Updated & Maintained by </p>
<p class="copyright-text" title=" © Content Owned, Updated & Maintained by O/o Pr. CCA , Central Board of Indirect Taxes & Customs, Department of Revenue, Ministry of Finance, Government of India">O/o Pr. CCA , Central Board of Indirect Taxes & Customs, Department of Revenue, Ministry of Finance, Government of India</p>
</div>
</div>
</div>
</footer>
<!-------------------------------------------Middle Content FINISH---------------------------->
<!-- javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="~/Scripts/elmenu.js"></script>
#*<script src="~/Scripts/bootstrap.min.js"></script>*#
<script src="~/Content/theme/assets/global/plugins/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript">
$(function () {
$(this).bind("contextmenu", function (e) {
e.preventDefault();
});
});
function disableBackButton() {
window.history.forward()
}
function noBack() {
disableBackButton();
window.onload = disableBackButton();
window.onpageshow = function (evt) { if (evt.persisted) disableBackButton() }
window.onunload = function () { void (0) }
}
</script>
<script type="text/javascript">
history.pushState(null, null, ' ');
window.addEventListener('popstate', function (event) {
history.pushState(null, null, ' ');
});
</script>
<script>
$(function () {
$('.pop').on('click', function () {
$('.imagepreview').attr('src', $(this).find('img').attr('src'));
$('#imagemodal').modal('show');
});
});
</script>
<script>
//Code start for Menue activation
$(document).ready(function () {
if (('Overview,OrganisationChart,OrganisationFunctions,DirectoryofOfficers').indexOf('#ViewBag.Title') >= 0) {
$('#AboutUs').addClass('active');
$('#' + '#ViewBag.Title').addClass('active');
} else {
$('#' + '#ViewBag.Title').addClass('active');
}
});
//Code end for Menue activation
</script>
<script type="text/javascript">
var section;
var factor = 0.8;
function getFontSize(el) {
var fs = $(el).css('font-size');
if (!el.originalFontSize) el.originalFontSize = fs; //set dynamic property for later reset
return parseFloat(fs);
}
function setFontSize(fact) {
if (section == null)
section = $('#content').find('*')
.filter(
function () {
return $(this).clone()
.children()
.remove()
.end()
.text().trim().length > 0;
}); //filter -> exclude all elements without text
section.each(function () {
var newsize = fact ? getFontSize(this) * fact : this.originalFontSize;
if (newsize) $(this).css('font-size', newsize);
});
}
function resetFont() {
setFontSize();
}
function increaseFont() {
setFontSize(1 / factor);
}
function decreaseFont() {
setFontSize(factor);
}
</script>
</body>
<style>
.page-wrap:after {
content: "";
display: block;
}
#footer, .page-wrap:after {
height: 103px;
}
</style>
</html>
when I check on the w3 validation. Below error is coming:-
Stray end tag “head”.
From line 30, column 1 to line 30, column 7
Code Extract:
dif]-->↩ ↩↩↩↩
Cannot recover after last error. Any further errors will be ignored.
From line 32, column 1 to line 32, column 19
Code Extract:
↩↩↩
How this will resolve. I am not able to understand. You can also check by
https://validator.w3.org/nu/#textarea . Same error will show.
i'm updating my site to bootstrap 3 and i have a problem i have added my navbar and header but when i try to add a jumbotron it appears under the bs-header dono why it does that i check every thing if my div are closed and they are sow if some one can tel me what i'm doing wrong ?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="HyperGainZ">
<title> My Mod Pack · MMP </title>
<!-- Bootstrap core CSS -->
<link href="assets/css/bootstrap-simplex.css" rel="stylesheet">
<link href="assets/css/bootstrap-simplex.min.css" rel="stylesheet">
<!-- Documentation extras -->
<link href="assets/css/docs-index.css" rel="stylesheet">
<link href="assets/css/pygments-manni.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="../../assets/js/html5shiv.js"></script>
<script src="../../assets/js/respond.min.js"></script>
<![endif]-->
<!-- Favicons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72.png">
<link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57.png">
<link rel="shortcut icon" href="../assets/ico/favicon.png">
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
MMP
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar-main">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="navbar-collapse collapse" id="navbar-main">
<ul class="nav navbar-nav">
<li class="active">
Home
</li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#" id="download">Dropdown <span class="caret"></span></a>
<ul class="dropdown-menu" aria-labelledby="download">
<li><a tabindex="-1" href="#">1</a></li>
<li><a tabindex="-1" href="#">2</a></li>
<li class="divider"></li>
<li><a tabindex="-1" href="#">3</a></li>
<li><a tabindex="-1" href="#">4</a></li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>Sign Up</li>
<li class="divider"></li>
<li>Sign In</li>
</ul>
</div>
</div>
<div class="bs-header" id="content">
<div class="container">
<br />
<img src="assets/img/index.jpeg" class="img-circle" width="125px" height="125px"alt="Sevadus" align="left">
<h1>MMP</h1>
<p class="lead">My Mod Pack</p></img>
<div id="carbonads-container">
<div class="carbonad">
<div id="azcarbon">
<h4>Site Version : <span class="badge badge-success">Alpha</span></h4>
<h4>Head Of Project : <span class="badge badge-info">HyperGainZ</span></h4>
<h4>acepting Beta's : <span class="badge badge-success">Yes</span></h4>
<h4>Public Launcher : <span class="badge badge-primary">Not Yet</span></h4>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-lg-12 jumbotron">
<h1>Pack Assembler</h1>
<p>Managing Mods, Packs, and Servers easily and efficiently.</p>
<p>
Get Started <i class="icon-double-angle-right"></i>
</p>
</div>
</div>
</div>
<!-- Placed at the end of the document so the pages load faster -->
<script src="assets/js/jquery.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
</body>
Because you're containing .bs-header within .navbar-fixed-top you'll need to use top padding equal to the static height of your navbar, on the body.
From the bootstrap documentation:
The fixed navbar will overlay your other content, unless you add
padding to the top of the . Tip: By default, the navbar is 50px
high.