Background Picture in webpage - html
CSS and below is the HTML
/*!
* Start Bootstrap - Grayscale v5.0.2 (https://startbootstrap.com/template-overviews/grayscale)
* Copyright 2013-2018 Start Bootstrap
* Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap-grayscale/blob/master/LICENSE)
*/#mainNav{min-height:56px;background-color:#fff}#mainNav .navbar-toggler{font-size:80%;padding:.75rem;color:#64a19d;border:1px solid #64a19d}#mainNav .navbar-toggler:focus{outline:0}#mainNav .navbar-brand{color:#161616;font-weight:700;padding:.9rem 0}#mainNav .navbar-nav .nav-item:hover{color:fade(white,80%);outline:0;background-color:transparent}#mainNav .navbar-nav .nav-item:active,#mainNav .navbar-nav .nav-item:focus{outline:0;background-color:transparent}#media (min-width:992px){#mainNav{padding-top:0;padding-bottom:0;border-bottom:none;background-color:transparent;-webkit-transition:background-color .3s ease-in-out;transition:background-color .3s ease-in-out}#mainNav .navbar-brand{padding:.5rem 0;color:rgba(255,255,255,.5)}#mainNav .nav-link{-webkit-transition:none;transition:none;padding:2rem 1.5rem;color:rgba(255,255,255,.5)}#mainNav .nav-link:hover{color:rgba(255,255,255,.75)}#mainNav .nav-link:active{color:#fff}#mainNav.navbar-shrink{background-color:#fff}#mainNav.navbar-shrink .navbar-brand{color:#161616}#mainNav.navbar-shrink .nav-link{color:#161616;padding:1.5rem 1.5rem 1.25rem;border-bottom:.25rem solid transparent}#mainNav.navbar-shrink .nav-link:hover{color:#64a19d}#mainNav.navbar-shrink .nav-link:active{color:#467370}#mainNav.navbar-shrink .nav-link.active{color:#64a19d;outline:0;border-bottom:.25rem solid #64a19d}}.masthead{position:relative;width:100%;height:auto;min-height:35rem;padding:15rem 0;background:-webkit-gradient(linear,left top,left bottom,from(rgba(22,22,22,.1)),color-stop(75%,rgba(22,22,22,.5)),to(#161616)),url(../img/bg-masthead3.jpg);background:linear-gradient(to bottom,rgba(22,22,22,.1) 0,rgba(22,22,22,.5) 75%,#161616 100%),url(../img/bg-masthead3.jpg);background-position:center;background-repeat:no-repeat;background-attachment:scroll;background-size:cover}.masthead h1{font-family:'Varela Round';font-size:2.5rem;line-height:2.5rem;letter-spacing:.8rem;background:-webkit-linear-gradient(rgba(255,255,255,.9),rgba(255,255,255,0));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.masthead h2{max-width:20rem;font-size:1rem}#media (min-width:768px){.masthead h1{font-size:4rem;line-height:4rem}}#media (min-width:992px){.masthead{height:100vh;padding:0}.masthead h1{font-size:6.5rem;line-height:6.5rem;letter-spacing:.8rem}.masthead h2{max-width:30rem;font-size:1.25rem}}.btn{-webkit-box-shadow:0 .1875rem .1875rem 0 rgba(0,0,0,.1)!important;box-shadow:0 .1875rem .1875rem 0 rgba(0,0,0,.1)!important;padding:1.25rem 2rem;font-family:'Varela Round';font-size:80%;text-transform:uppercase;letter-spacing:.15rem;border:0}.btn-primary{background-color:#64a19d}.btn-primary:hover{background-color:#4f837f}.btn-primary:focus{background-color:#4f837f;color:#fff}.btn-primary:active{background-color:#467370!important}.about-section{padding-top:10rem;background:-webkit-gradient(linear,left top,left bottom,from(#161616),color-stop(75%,rgba(22,22,22,.9)),to(rgba(22,22,22,.8)));background:linear-gradient(to bottom,#161616 0,rgba(22,22,22,.9) 75%,rgba(22,22,22,.8) 100%)}.about-section p{margin-bottom:5rem}.projects-section{padding:10rem 0}.projects-section .featured-text{padding:2rem}#media (min-width:992px){.projects-section .featured-text{padding:0 0 0 2rem;border-left:.5rem solid #64a19d}}.projects-section .project-text{padding:3rem;font-size:90%}#media (min-width:992px){.projects-section .project-text{padding:5rem}.projects-section .project-text hr{border-color:#64a19d;border-width:.25rem;width:30%}}.signup-section{padding:10rem 0;background:-webkit-gradient(linear,left top,left bottom,from(rgba(22,22,22,.1)),color-stop(75%,rgba(22,22,22,.5)),to(#161616)),url(../img/bg-signup.jpg);background:linear-gradient(to bottom,rgba(22,22,22,.1) 0,rgba(22,22,22,.5) 75%,#161616 100%),url(../img/bg-signup.jpg);background-position:center;background-repeat:no-repeat;background-attachment:scroll;background-size:cover}.signup-section .form-inline input{-webkit-box-shadow:0 .1875rem .1875rem 0 rgba(0,0,0,.1)!important;box-shadow:0 .1875rem .1875rem 0 rgba(0,0,0,.1)!important;padding:1.25rem 2rem;height:auto;font-family:'Varela Round';font-size:80%;text-transform:uppercase;letter-spacing:.15rem;border:0}.contact-section{padding:5rem 0 0}.contact-section .card{border:0;border-bottom:.25rem solid #64a19d}.contact-section .card h4{font-size:.8rem;font-family:'Varela Round';text-transform:uppercase;letter-spacing:.15rem}.contact-section .card hr{border-color:#64a19d;border-width:.25rem;width:3rem}.contact-section .social{margin-top:5rem}.contact-section .social a{text-align:center;height:3rem;width:3rem;background:rgba(255,255,255,.1);border-radius:100%;line-height:3rem;color:rgba(255,255,255,.3)}.contact-section .social a:hover{color:rgba(255,255,255,.5)}.contact-section .social a:active{color:#fff}body{font-family:Nunito;letter-spacing:.0625em}a{color:#64a19d}a:focus,a:hover{text-decoration:none;color:#3c6360}.bg-black{background-color:#161616!important}.bg-primary{background-color:#64a19d!important}.text-primary{color:#64a19d!important}footer{padding:5rem 0}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Grayscale - Start Bootstrap Theme</title>
<!-- Bootstrap core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom fonts for this template -->
<link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Varela+Round" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/grayscale.min.css" rel="stylesheet">
</head>
<body id="page-top">
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-light fixed-top" id="mainNav">
<div class="container">
<a class="navbar-brand js-scroll-trigger" href="#page-top">iSalon</a>
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
Menu
<i class="fas fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="#about">About</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="#projects">Features</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="#signup">Devs</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="login.html">Login</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- Header -->
<header class="masthead">
<div class="container d-flex h-100 align-items-center">
<div class="mx-auto text-center">
<h1 class="mx-auto my-0 text-uppercase">iSalon</h1>
<h2 class="text-white-50 mx-auto mt-2 mb-5"><i>"Style on the go, wherever you go."</i></h2>
<!-- for admin only <h2 class="text-white-50 mx-auto mt-2 mb-5"><b>(Admin Mode)</b></h2> -->
Learn About iSalon
</div>
</div>
</header>
<!-- About Section -->
<section id="about" class="about-section text-center">
<div class="container">
<div class="row">
<div class="col-lg-8 mx-auto">
<h2 class="text-white mb-4">About iSalon</h2>
<p class="text-white-50">Getting our haircuts or nails polished or even having a massage </p>
</div>
</div>
<img src="img/ipad.png" class="img-fluid" alt="">
</div>
</section>
<!-- Projects Section -->
<section id="projects" class="projects-section bg-light">
<div class="container">
<!-- Featured Project Row -->
<div class="row align-items-center no-gutters mb-4 mb-lg-5">
<div class="col-xl-8 col-lg-7">
<img class="img-fluid mb-3 mb-lg-0" src="img/bg-masthead.jpg" alt="">
</div>
<div class="col-xl-4 col-lg-5">
<div class="featured-text text-center text-lg-left">
<h4>Shoreline</h4>
<p class="text-black-50 mb-0">Grayscale is open source and MIT licensed. This means you can use it for any project - even commercial projects! Download it, customize it, and publish your website!</p>
</div>
</div>
</div>
<!-- Project One Row -->
<div class="row justify-content-center no-gutters mb-5 mb-lg-0">
<div class="col-lg-6">
<img class="img-fluid" src="img/demo-image-01.jpg" alt="">
</div>
<div class="col-lg-6">
<div class="bg-black text-center h-100 project">
<div class="d-flex h-100">
<div class="project-text w-100 my-auto text-center text-lg-left">
<h4 class="text-white">Misty</h4>
<p class="mb-0 text-white-50">An example of where you can put an image of a project, or anything else, along with a description.</p>
<hr class="d-none d-lg-block mb-0 ml-0">
</div>
</div>
</div>
</div>
</div>
<!-- Project Two Row -->
<div class="row justify-content-center no-gutters">
<div class="col-lg-6">
<img class="img-fluid" src="img/demo-image-02.jpg" alt="">
</div>
<div class="col-lg-6 order-lg-first">
<div class="bg-black text-center h-100 project">
<div class="d-flex h-100">
<div class="project-text w-100 my-auto text-center text-lg-right">
<h4 class="text-white">Mountains</h4>
<p class="mb-0 text-white-50">Another example of a project with its respective description. These sections work well responsively as well, try this theme on a small screen!</p>
<hr class="d-none d-lg-block mb-0 mr-0">
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Signup Section -->
<section id="signup" class="signup-section">
<div class="container">
<div class="row">
<div class="col-md-10 col-lg-8 mx-auto text-center">
<i class="far fa-paper-plane fa-2x mb-2 text-white"></i>
<h2 class="text-white mb-5">Interested to join in?</h2>
<form class="form-inline d-flex">
<button type="submit" class="btn btn-primary mx-auto">Sign up now!</button>
</form>
</div>
</div>
</div>
</section>
<!-- Contact Section -->
<section class="contact-section bg-black">
<div class="container">
<div class="row">
<div class="col-md-4 mb-3 mb-md-0">
<div class="card py-4 h-100">
<div class="card-body text-center">
<i class="fas fa-map-marked-alt text-primary mb-2"></i>
<h4 class="text-uppercase m-0">Address</h4>
<hr class="my-4">
<div class="small text-black-50">4923 Market Street, Orlando FL</div>
</div>
</div>
</div>
<div class="col-md-4 mb-3 mb-md-0">
<div class="card py-4 h-100">
<div class="card-body text-center">
<i class="fas fa-envelope text-primary mb-2"></i>
<h4 class="text-uppercase m-0">Email</h4>
<hr class="my-4">
<div class="small text-black-50">
hello#yourdomain.com
</div>
</div>
</div>
</div>
<div class="col-md-4 mb-3 mb-md-0">
<div class="card py-4 h-100">
<div class="card-body text-center">
<i class="fas fa-mobile-alt text-primary mb-2"></i>
<h4 class="text-uppercase m-0">Phone</h4>
<hr class="my-4">
<div class="small text-black-50">+1 (555) 902-8832</div>
</div>
</div>
</div>
</div>
<div class="social d-flex justify-content-center">
<a href="#" class="mx-2">
<i class="fab fa-twitter"></i>
</a>
<a href="#" class="mx-2">
<i class="fab fa-facebook-f"></i>
</a>
<a href="#" class="mx-2">
<i class="fab fa-github"></i>
</a>
</div>
</div>
</section>
<!-- Footer -->
<footer class="bg-black small text-center text-white-50">
<div class="container">
Copyright © Your Website 2018
</div>
</footer>
<!-- Bootstrap core JavaScript -->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- Plugin JavaScript -->
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>
<!-- Custom scripts for this template -->
<script src="js/grayscale.min.js"></script>
</body>
</html>
I am new at bootstrap and I got a template from the web. It is inside a folder and the file is in html. I have made another separate file of folder that contains a simple php login form. When i turned in for my xampp and went to localhost. so when I opened my downloaded template (via dragging the html file). It looked like this
I have modified the background picture. And tried to connect my login (login button directs to login form) form with this and opening it via xampp but this pops up.
Did I miss something in my css? I have checkede and it was all the same. Please someone help
Related
How to move footer automatically downward when new content add into the body?
Hello everyone I have created a navigation bar and footer in different pages and then add into ever page through include PHP function. my issue when I add content a lot into the body then the body content overlap the footer. Currently I am using bootstrap 5 for this website this is the code of footer <!-- Footer --> <footer class="text-center text-lg-start bg-info text-muted"> <!-- Section: Social media --> <section class="d-flex justify-content-center justify-content-lg-between p-4 border-bottom"> </section> <!-- Section: Social media --> <!-- Section: Links --> <section class=""> <div class="container text-center text-md-start mt-5"> <!-- Grid row --> <div class="row mt-3"> <!-- Grid column --> <div class="col-md-3 col-lg-4 col-xl-3 mx-auto mb-4"> <!-- Content --> <h6 class="text-uppercase fw-bold mb-4"> <i class="fas fa-gem me-3"></i>Company name </h6> <p> Here you can use rows and columns to organize your footer content. Lorem ipsum dolor sit amet, consectetur adipisicing elit. </p> </div> <!-- Grid column --> <!-- Grid column --> <div class="col-md-2 col-lg-2 col-xl-2 mx-auto mb-4"> <!-- Links --> <h6 class="text-uppercase fw-bold mb-4"> Products </h6> <p> Angular </p> <p> React </p> <p> Vue </p> <p> Laravel </p> </div> <!-- Grid column --> <!-- Grid column --> <div class="col-md-3 col-lg-2 col-xl-2 mx-auto mb-4"> <!-- Links --> <h6 class="text-uppercase fw-bold mb-4"> Useful links </h6> <p> Pricing </p> <p> Settings </p> <p> Orders </p> <p> Help </p> </div> <!-- Grid column --> <!-- Grid column --> <div class="col-md-4 col-lg-3 col-xl-3 mx-auto mb-md-0 mb-4"> <!-- Links --> <h6 class="text-uppercase fw-bold mb-4">Contact</h6> <p><i class="fas fa-home me-3"></i> New York, NY 10012, US</p> <p> <i class="fas fa-envelope me-3"></i> info#example.com </p> <p><i class="fas fa-phone me-3"></i> + 01 234 567 88</p> <p><i class="fas fa-print me-3"></i> + 01 234 567 89</p> </div> <!-- Grid column --> </div> <!-- Grid row --> </div> </section> <!-- Section: Links --> <!-- Copyright --> <div class="text-center p-4" style="background-color: rgba(0, 0, 0, 0.05);"> © 2021 Copyright: <a class="text-reset fw-bold" href="https://mdbootstrap.com/">MDBootstrap.com</a> </div> <!-- Copyright --> </footer> <!-- Footer --> this is the code of navigation bar <!DOCTYPE html> <html lang="en"> <head> <title>SMS</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="bootstrapfile/bootstrap.min.css" rel="stylesheet"> <script src="bootstrapfile/bootstrap.bundle.min.js"></script> </head> <body> <nav class="navbar navbar-expand-sm bg-info navbar-light"> <a class="navbar-brand" href="#">SMS</a> <button class="navbar-toggler" type="button" data-bs-toggle = "collapse" data-bs-target="#mango"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="mango"> <ul class="navbar-nav" id="mango"> <li class="nav-item"> <a class="nav-link" href="">Home</a> </li> <li class="nav-item"> <a class="nav-link" href="">About us</a> </li> <li class="nav-item"> <a class="nav-link" href="">About us</a> </li> <li class="nav-item dropdown"> <a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#">Login Panel</a> <ul class="dropdown-menu"> <li><a class="dropdown-item" href="studentLogin.php">Student Login</a></li> <li><a class="dropdown-item" href="#">Teacher Login</a></li> </ul> </div> </nav> <br> </body> </html> this is the code of registeration page where i add navigation bar and footer with include function <?php include "navigation.php" ?> <body> <section class="vh-100" > <div class="container h-100"> <div class="row d-flex justify-content-center align-items-center h-100"> <div class="col-lg-12 col-xl-11"> <div class="card text-black" style="border-radius: 50px;"> <div class="card-body p-md-5"> <div class="row justify-content-center"> <div class="col-md-10 col-lg-6 col-xl-5 order-2 order-lg-1"> <p class="text-center h1 fw-bold mb-5 mx-1 mx-md-4 mt-4">Sign up</p> <form class="mx-1 mx-md-4"> <div class="d-flex flex-row align-items-center mb-4"> <i class="fas fa-user fa-lg me-3 fa-fw"></i> <div class="form-outline flex-fill mb-0"> <input type="text" id="form3Example1c" class="form-control" /> <label class="form-label" for="form3Example1c">Your Name</label> </div> </div> <div class="d-flex flex-row align-items-center mb-4"> <i class="fas fa-envelope fa-lg me-3 fa-fw"></i> <div class="form-outline flex-fill mb-0"> <input type="email" id="form3Example3c" class="form-control" /> <label class="form-label" for="form3Example3c">Your Email</label> </div> </div> <div class="d-flex flex-row align-items-center mb-4"> <i class="fas fa-lock fa-lg me-3 fa-fw"></i> <div class="form-outline flex-fill mb-0"> <input type="password" id="form3Example4c" class="form-control" /> <label class="form-label" for="form3Example4c">Password</label> </div> </div> <div class="d-flex flex-row align-items-center mb-4"> <i class="fas fa-key fa-lg me-3 fa-fw"></i> <div class="form-outline flex-fill mb-0"> <input type="password" id="form3Example4cd" class="form-control" /> <label class="form-label" for="form3Example4cd">Repeat your password</label> </div> </div> <div class="d-flex flex-row align-items-center mb-4"> <i class="fas fa-key fa-lg me-3 fa-fw"></i> <div class="form-outline flex-fill mb-0"> <input type="password" id="form3Example4cd" class="form-control" /> <label class="form-label" for="form3Example4cd">Date of Birth</label> </div> </div> <div class="d-flex flex-row align-items-center mb-4"> <i class="fas fa-key fa-lg me-3 fa-fw"></i> <div class="form-outline flex-fill mb-0"> <input type="password" id="form3Example4cd" class="form-control" /> <label class="form-label" for="form3Example4cd">Date of Join</label> </div> </div> <div class="d-flex justify-content-center mx-4 mb-3 mb-lg-4"> <button type="button" class="btn btn-primary btn-lg">Register</button> </div> <div class="form-check d-flex justify-content-center mb-5"> <label class="form-check-label" for="form2Example3"> <a style="text-decoration: none" class="text-danger" href="studentLogin.php">Back to Login Page</a> </label> </div> </form> </div> <div class="col-md-10 col-lg-6 col-xl-7 d-flex align-items-center order-1 order-lg-2"> <img src="draw1.webp" class="img-fluid" alt="Sample image"> </div> </div> </div> </div> </div> </div> </div> </section> <?php include "footer.php" ?> </body> this is the image [enter image description here][2]
Let's see, there are some errors in your navigation.php code, because you are opening the <html> and <body> tag. And right after, in registation.php you are calling navigation.php and you are opening another <body> tag. That is, you are joining 2 HTML documents. Instead of <br> you can use mb-2 or another "mb-" class from Bootstrap, because it means margin-button and leaves a dividing space between another element. Also, inside footer.php place your scripts (remember that you are one line before the <body> so just place them at the end of the footer tag. Registration page: <!DOCTYPE html> <html lang="en"> <head> <title>SMS</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="bootstrapfile/bootstrap.min.css" rel="stylesheet"> </head> <body> <?php include "navigation.php" ?> <section> <div class="container"> <div class="row d-flex justify-content-center align-items-center h-100"> <div class="col-lg-12 col-xl-11"> <div class="card text-black" style="border-radius: 50px;"> <div class="card-body p-md-5"> <div class="row justify-content-center"> <div class="col-md-10 col-lg-6 col-xl-5 order-2 order-lg-1"> <p class="text-center h1 fw-bold mb-5 mx-1 mx-md-4 mt-4">Sign up</p> <form class="mx-1 mx-md-4"> <div class="d-flex flex-row align-items-center mb-4"> <i class="fas fa-user fa-lg me-3 fa-fw"></i> <div class="form-outline flex-fill mb-0"> <input type="text" id="form3Example1c" class="form-control" /> <label class="form-label" for="form3Example1c">Your Name</label> </div> </div> <div class="d-flex flex-row align-items-center mb-4"> <i class="fas fa-envelope fa-lg me-3 fa-fw"></i> <div class="form-outline flex-fill mb-0"> <input type="email" id="form3Example3c" class="form-control" /> <label class="form-label" for="form3Example3c">Your Email</label> </div> </div> <div class="d-flex flex-row align-items-center mb-4"> <i class="fas fa-lock fa-lg me-3 fa-fw"></i> <div class="form-outline flex-fill mb-0"> <input type="password" id="form3Example4c" class="form-control" /> <label class="form-label" for="form3Example4c">Password</label> </div> </div> <div class="d-flex flex-row align-items-center mb-4"> <i class="fas fa-key fa-lg me-3 fa-fw"></i> <div class="form-outline flex-fill mb-0"> <input type="password" id="form3Example4cd" class="form-control" /> <label class="form-label" for="form3Example4cd">Repeat your password</label> </div> </div> <div class="d-flex flex-row align-items-center mb-4"> <i class="fas fa-key fa-lg me-3 fa-fw"></i> <div class="form-outline flex-fill mb-0"> <input type="password" id="form3Example4cd" class="form-control" /> <label class="form-label" for="form3Example4cd">Date of Birth</label> </div> </div> <div class="d-flex flex-row align-items-center mb-4"> <i class="fas fa-key fa-lg me-3 fa-fw"></i> <div class="form-outline flex-fill mb-0"> <input type="password" id="form3Example4cd" class="form-control" /> <label class="form-label" for="form3Example4cd">Date of Join</label> </div> </div> <div class="d-flex justify-content-center mx-4 mb-3 mb-lg-4"> <button type="button" class="btn btn-primary btn-lg">Register</button> </div> <div class="form-check d-flex justify-content-center mb-5"> <label class="form-check-label" for="form2Example3"> <a style="text-decoration: none" class="text-danger" href="studentLogin.php">Back to Login Page</a> </label> </div> </form> </div> <div class="col-md-10 col-lg-6 col-xl-7 d-flex align-items-center order-1 order-lg-2"> <img src="draw1.webp" class="img-fluid" alt="Sample image"> </div> </div> </div> </div> </div> </div> </div> </section> <?php include "footer.php" ?> </body> </html> Navigation.php: <nav class="navbar navbar-expand-sm bg-info navbar-light mb-2"> <a class="navbar-brand" href="#">SMS</a> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#mango"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="mango"> <ul class="navbar-nav" id="mango"> <li class="nav-item"> <a class="nav-link" href="">Home</a> </li> <li class="nav-item"> <a class="nav-link" href="">About us</a> </li> <li class="nav-item"> <a class="nav-link" href="">About us</a> </li> <li class="nav-item dropdown"> <a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#">Login Panel</a> <ul class="dropdown-menu"> <li><a class="dropdown-item" href="studentLogin.php">Student Login</a></li> <li><a class="dropdown-item" href="#">Teacher Login</a></li> </ul> </div> </nav> Footer.php: <!-- Footer --> <footer class="text-center text-lg-start bg-info text-muted"> <!-- Section: Social media --> <section class="d-flex justify-content-center justify-content-lg-between p-4 border-bottom"> </section> <!-- Section: Social media --> <!-- Section: Links --> <section class=""> <div class="container text-center text-md-start mt-5"> <!-- Grid row --> <div class="row mt-3"> <!-- Grid column --> <div class="col-md-3 col-lg-4 col-xl-3 mx-auto mb-4"> <!-- Content --> <h6 class="text-uppercase fw-bold mb-4"> <i class="fas fa-gem me-3"></i>Company name </h6> <p> Here you can use rows and columns to organize your footer content. Lorem ipsum dolor sit amet, consectetur adipisicing elit. </p> </div> <!-- Grid column --> <!-- Grid column --> <div class="col-md-2 col-lg-2 col-xl-2 mx-auto mb-4"> <!-- Links --> <h6 class="text-uppercase fw-bold mb-4"> Products </h6> <p> Angular </p> <p> React </p> <p> Vue </p> <p> Laravel </p> </div> <!-- Grid column --> <!-- Grid column --> <div class="col-md-3 col-lg-2 col-xl-2 mx-auto mb-4"> <!-- Links --> <h6 class="text-uppercase fw-bold mb-4"> Useful links </h6> <p> Pricing </p> <p> Settings </p> <p> Orders </p> <p> Help </p> </div> <!-- Grid column --> <!-- Grid column --> <div class="col-md-4 col-lg-3 col-xl-3 mx-auto mb-md-0 mb-4"> <!-- Links --> <h6 class="text-uppercase fw-bold mb-4">Contact</h6> <p><i class="fas fa-home me-3"></i> New York, NY 10012, US</p> <p> <i class="fas fa-envelope me-3"></i> info#example.com </p> <p><i class="fas fa-phone me-3"></i> + 01 234 567 88</p> <p><i class="fas fa-print me-3"></i> + 01 234 567 89</p> </div> <!-- Grid column --> </div> <!-- Grid row --> </div> </section> <!-- Section: Links --> <!-- Copyright --> <div class="text-center p-4" style="background-color: rgba(0, 0, 0, 0.05);"> © 2021 Copyright: <a class="text-reset fw-bold" href="https://mdbootstrap.com/">MDBootstrap.com</a> </div> <!-- Copyright --> </footer> <!-- Footer --> <!-- HERE PASTE YOUR JAVASCRIPT TAGS, REMEMBER THATS THE END OF THE BODY TAG --> <script src="bootstrapfile/bootstrap.bundle.min.js"></script>
I hope you're working on a project so it will be important to setup Partials. Partials pages are default pages we setup so that whenever we render a new page first the code goes through partial before execution. The best practices are setup a 'Layout page'and a 'Partials page'.
Bootstrap not loading when my html files are in templates folder
I am trying to do my very first own web app with Spring, Thymeleaf and everything seemed to be going well, however after I separated my html files in "templates" folder, since that is required to use thymeleaf, my bootstrap,JS,CSS and all my other resources stopped working. I have my boostrap included with CDN with the css included in the header and JS,jQuery and popper included in the bottom of the body. I've tried moving the CDN links all in the header, removing my own js and css, however it didn't work. You can review the html below: <!doctype html> <html lang="en" xmlns:th="http://www.thymeleaf.org"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <!-- Bootstrap CSS --> <link rel="stylesheet" href="../static/css/style.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap#4.0.0/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> <title>EventFinder</title> </head> <body> <nav class="navbar navbar-expand-md navbar-light bg-light sticky-top"> <div class="container-fluid"> <a class="navbar-brand">eventfinder</a> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive"> <span class="navbar-toggler-icon"> </span> </button> <div class="collapse navbar-collapse" id="#navbarResponsive"> <ul class="navbar-nav ml-auto"> <li class="nav-item active"> <a class="nav-link active" aria-current="page" href="/">Home</a> </li> <li class="nav-item"> <a class="nav-link" aria-current="page" href="/">Organize an event</a> </li> <li class="nav-item"> <a class="nav-link" aria-current="page" href="/">Register</a> </li> <li class="nav-item"> <a class="nav-link active" aria-current="page" href="/login">Login</a> </li> <li class="nav-item"> <a class="nav-link active" aria-current="page" href="/">Logout</a> </li> </ul> </div> </div> </nav> <div id="slides" class="carousel slide" data-bs-ride="carousel"> <div class="carousel-inner"> <div class="carousel-item active"> <img src="../static/images/music.jpg" class="d-block w-100" alt="Music events"> </div> <div class="carousel-item"> <img src="../static/images/arts.jpg" class="d-block w-100" alt="Art events"> </div> <div class="carousel-item"> <img src="../static/images/travel.jpg" class="d-block w-100" alt="Travel and outdoor events"> </div> <div class="carousel-item"> <img src="../static/images/hobbies.jpg" class="d-block w-100" alt="Hobbies"> </div> </div> </div> <div class="container-fluid padding"> <div class="row welcome text-center"> <div class="col-12"> <h1 class="display-4">Welcome to eventfinder.</h1> </div> <hr> <div class="col-12"> <p class="lead">Here you can search, join and create all kind of events. Eventfinder is free of charge web app, where people with the same interests can match and meet in real life.</p> </div> </div> </div> <div class="container-fluid padding"> <div class="row container-fluid padding"> <div class="person_container col-12 col-sm-6 col-md-4"> <div class="img-area"> <img src="../static/images/person1.jpg" class="img-thumbnail person_pic"> </div> <p>Some text here</p> </div> <div class="person_container col-12 col-sm-6 col-md-4"> <div class="img-area"> <img src="../static/images/person2.jpg" class="img-thumbnail person_pic"> </div> <p>Some text here</p> </div> <div class="person_container col-12 col-md-4"> <div class="img-area"> <img src="../static/images/person3.jpg" class="img-thumbnail person_pic"> </div> <p>Some text here</p> </div> </div> <hr class="my-4"> </div> <div class="my-div-body"> <div class="row container-fluid"> <div class="col"> Most recently added events </div> </div> <div class="row recently-added-container container-fluid"> <div class="col"> TO ADD EVENT HERE </div> <div class="col"> TO ADD EVENT HERE </div> <div class="col"> TO ADD EVENT HERE </div> </div> </div> <div class="container-fluid padding"> <div class="row welcome text-center"> <div class="col-12"> <h1 class="display-4">Best cities to visit</h1> </div> <hr> <div class="container-fluid padding"> <div class="row padding"> <div class="col-md-4"> <div class="card"> <img class="city-img-top" src=""/> <div class="card-body"> <h4 class="card-title">City Name</h4> <p class="card-text">Some text here</p> See more </div> </div> </div> <div class="col-md-4"> <div class="card"> <img class="city-img-top" src=""/> <div class="card-body"> <h4 class="card-title">City Name</h4> <p class="card-text">Some text here</p> See more </div> </div> </div> <div class="col-md-4"> <div class="card"> <img class="city-img-top" src=""/> <div class="card-body"> <h4 class="card-title">City Name</h4> <p class="card-text">Some text here</p> See more </div> </div> </div> </div> </div> </div> </div> <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/popper.js#1.12.9/dist/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap#4.0.0/dist/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script> <script src="../static/js/app.js"></script> </body> </html> Also you can check my project structure here: Thank you in advance!
It's best to let thymeleaf handle paths for resources and not use relative ones. For example set the folowing properties spring: web: resources: static-locations: classpath:/static/ chain: strategy: content: enabled: true paths: /resources/** and then in the html do <link rel="stylesheet" th:href="#{/css/style.css}"> and <img th:src="#{/images/person3.jpg}" class="img-thumbnail person_pic"> This way you do not have to add an arbitrary amount of ../ to paths
Trying out bootstrap and getting bottom scroll bar when finalizing the skeleton for the website
Trying out bootstrap and getting bottom scroll bar. It seems to be some thing with the margins but cant figure it out. here is my following code. I am attaching photos of my code but didn't copy the bootstrap.css file it can be found here: https://getbootstrap.com/docs/5.0/getting-started/download/ <body> <header> <nav class="navbar navbar-expand-sm navbar-dark fixed-top bg-enter code hereprimary"> <div class="container"> <a class="navbar-brand" href="./index.html"> <img src="./imgs/LogoWhitePlain.png" width="35" height="30" class="d-inline-block align-top" alt="DKDESIGNS"> </a> <!--Logo--> <div class="collapse navbar-collapse" id="navbarCollapsem"> <ul class="nav navbar-nav"> <li class="nav-item"> <a class="nav-link active" href="./index.html">Home</a> </li> <li class="nav-item"> <a class="nav-link" href="./services.html">Services</a> </li> <li class="nav-item"> <a class="nav-link" href="./projects.html">Projects</a> </li> <li class="nav-item"> <a class="nav-link" href="./aboutMe.html">About Me</a> </li> </ul> </div> <!--navigation--> </div> </nav> <!--nav bar--> </header> <main role="main"> <!--main content--> <div class="bg-dark container-"> <div class="row"> <div class="col-md-2 col-sm-4"> <img src="imgs/LogoWhite.png" class="my-sm-4" width="175" height="150" class="d-inline-block align-top" alt=""> <!--Logo--> </div> <div class="col-md-10 col-sm-8"> <!--<h3 class="display-4 text-primary pt-5"><strong></strong></h3>--> <h4 class="display-5 pt-3 mt-sm-5"> <em class="text-white text-left"> Designs made easy! </em> </h4> </div> </div> </div> <div class="container my-4"> <div class="row"> <!--first row--> <div class="col-md-8 col-lg-9"> <h4 class="display-6 text-muted text-capitalize">Our mission</h4> <p> Our goal is to simplify the art of designing anything for your business, whether it be a detailed logo for your company's new look, photogtaphy for an special event or employee photos, a new website and/or design to be developed for your business, or a design for an advertisements to attract new customers/clients. We can help to make it easy and efficient, so that you can focus on the other important aspects of your business. So lets get started on a <u>your</u> project today! </p> </div> <div class="col-md-4 col-lg-3 text-center py-5 bg-primary border border-dark border-3"> <h4 class="text-white">Get your FREE Quote!</h4> <button class="btn btn-dark">Here</button> </div> </div> </div> </main> <footer> <!--footer content--> <div class="text-center"> <small class="text-muted text-center">© Daniel Krysty 2021</small> </div> <div class="row text-center"> <div class="col-1 offset-2"> <small> <a class="text-decoration-none text-muted"href="./index.html">Home</a> </small> </div> <div class="col-1"> <small> <a class="text-decoration-none text-muted"href="./services.html">Services</a> </small> </div> <div class="col-1"> <small> <a class="text-decoration-none text-muted"href="./projects.html">Projects</a> </small> </div> <div class="col-1"> <small> <a class="text-decoration-none text-muted"href="./aboutMe.html">About</a> </small> </div> <div class="col-1"> <small> <a class="text-decoration-none text-muted"href="./contact.html">Contact</a> </small> </div> <div class="col-1"> <small> <a class="text-decoration-none text-muted"href="./websites.html">Websites</a> </small> </div> <div class="col-1"> <small> <a class="text-decoration-none text-muted"href="./designs.html">Designs</a> </small> </div> <div class="col-1"> <small> <a class="text-decoration-none text-muted"href="./photography.html">Photography</a> </small> </div> </div> </footer> </body> attached css doc this is to help override the bootstrap.css code I got from the bootsrtap website. I am using the v5.0.2 not sure if that has anything to do with it. I downloaded the compiled css and javascript files. the bootstrap.css file is the one I am using body { padding-top: 3rem; padding-bottom: 3rem; width: 100%; /*background-image: url('../imgs/pattern.png');*/ /*background-repeat: repeat;*/ } .bg-primary { background-color: rgb(9, 129, 109) !important; } .btn-primary { background-color: rgb(9, 129, 109) !important; border-color: black !important; } .text-primary { color: rgb(9, 129, 109) !important; } .border-primary { border-color: rgb(9, 129, 109) !important; } .jumbotron-detail-skyline { background: url('../imgs/skykine_BW_new2.jpg') no-repeat fixed; } .jumbotron { height: 30vh; background-size: cover; background: black; width: 100%; } main { margin: auto; }
You have a hypen - after container class here: <main role="main"> <!--main content--> <div class="bg-dark container-"> Remove the hyphen - and try again please.
You will need to use containers for proper align your content. You will need to use .container or .container-fluid for each section according to your needs. You can try below your code. <body> <header> <nav class="navbar navbar-expand-sm navbar-dark fixed-top bg-enter code hereprimary"> <div class="container"> <a class="navbar-brand" href="./index.html"> <img src="./imgs/LogoWhitePlain.png" width="35" height="30" class="d-inline-block align-top" alt="DKDESIGNS"> </a> <!--Logo--> <div class="collapse navbar-collapse" id="navbarCollapsem"> <ul class="nav navbar-nav"> <li class="nav-item"> <a class="nav-link active" href="./index.html">Home</a> </li> <li class="nav-item"> <a class="nav-link" href="./services.html">Services</a> </li> <li class="nav-item"> <a class="nav-link" href="./projects.html">Projects</a> </li> <li class="nav-item"> <a class="nav-link" href="./aboutMe.html">About Me</a> </li> </ul> </div> <!--navigation--> </div> </nav> <!--nav bar--> </header> <main role="main"> <!--main content--> <div class="container-fluid bg-dark"> <div class="row"> <div class="col-md-2 col-sm-4"> <img src="imgs/LogoWhite.png" class="my-sm-4" width="175" height="150" class="d-inline-block align-top" alt=""> <!--Logo--> </div> <div class="col-md-10 col-sm-8"> <!--<h3 class="display-4 text-primary pt-5"><strong></strong></h3>--> <h4 class="display-5 pt-3 mt-sm-5"> <em class="text-white text-left"> Designs made easy! </em> </h4> </div> </div> </div> <div class="container my-4"> <div class="row"> <!--first row--> <div class="col-md-8 col-lg-9"> <h4 class="display-6 text-muted text-capitalize">Our mission</h4> <p> Our goal is to simplify the art of designing anything for your business, whether it be a detailed logo for your company's new look, photogtaphy for an special event or employee photos, a new website and/or design to be developed for your business, or a design for an advertisements to attract new customers/clients. We can help to make it easy and efficient, so that you can focus on the other important aspects of your business. So lets get started on a <u>your</u> project today! </p> </div> <div class="col-md-4 col-lg-3 text-center py-5 bg-primary border border-dark border-3"> <h4 class="text-white">Get your FREE Quote!</h4> <button class="btn btn-dark">Here</button> </div> </div> </div> </main> <footer> <div class="container-fluid"> <!--footer content--> <div class="text-center"> <small class="text-muted text-center">© Daniel Krysty 2021</small> </div> <div class="row text-center"> <div class="col-1 offset-2"> <small> <a class="text-decoration-none text-muted"href="./index.html">Home</a> </small> </div> <div class="col-1"> <small> <a class="text-decoration-none text-muted"href="./services.html">Services</a> </small> </div> <div class="col-1"> <small> <a class="text-decoration-none text-muted"href="./projects.html">Projects</a> </small> </div> <div class="col-1"> <small> <a class="text-decoration-none text-muted"href="./aboutMe.html">About</a> </small> </div> <div class="col-1"> <small> <a class="text-decoration-none text-muted"href="./contact.html">Contact</a> </small> </div> <div class="col-1"> <small> <a class="text-decoration-none text-muted"href="./websites.html">Websites</a> </small> </div> <div class="col-1"> <small> <a class="text-decoration-none text-muted"href="./designs.html">Designs</a> </small> </div> <div class="col-1"> <small> <a class="text-decoration-none text-muted"href="./photography.html">Photography</a> </small> </div> </div> </div> </footer> </body>
(Bootstrap 4) : Align Button with the text to be same line
How to align all divs to be center on the same line. What I mean I want the button to be centered with text like such image, for example, the social icons are centered like text not down like mine in dark <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet"/> <footer id="main-footer" class="bg-dark"> <div class="container d-flex flex-sm-column justify-content-between py-3"> <div class="row py-4 text-center align-content-between flex-wrap"> <div class="col-lg-4 mb-3"> <p class="text-secondary">Copyright © Saud</p> </div> <div class="col-lg-4 mb-3 "> <!-- Button trigger modal --> <button type="button" class="btn btn-primary " data-toggle="modal" data-target="#exampleModal"> Contact Us </button> </div> <div class="col-lg-4 mb-3"> <ul class="list-inline quicklinks"> <li class="list-inline-item"> Privacy Policy </li> <li class="list-inline-item"> Terms of Use </li> </ul> </div> </div> </div> </footer>
To center align them, make the columns d-flex and use align-items-center... <div class="row text-center py-4 align-content-between flex-wrap"> <div class="col-lg-4 d-flex justify-content-center align-items-center"> <p class="text-secondary mb-0">Copyright © Saud</p> </div> <div class="col-lg-4"> <!-- Button trigger modal --> <button type="button" class="btn btn-primary " data-toggle="modal" data-target="#exampleModal"> Contact Us </button> </div> <div class="col-lg-4 d-flex justify-content-center align-items-center"> <ul class="list-inline quicklinks mb-0"> <li class="list-inline-item"> Privacy Policy </li> <li class="list-inline-item"> Terms of Use </li> </ul> </div> </div> https://codeply.com/p/BBJM8P9UPR
You want to align all the elements by its' texts, right? If so, in the div.row add align-items-baseline class. See Bootstrap and MDN documentation for details. <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet"/> <footer id="main-footer" class="bg-dark"> <div class="container d-flex flex-sm-column justify-content-between py-3"> <div class="row py-4 text-center align-content-between flex-wrap align-items-baseline"> <div class="col-lg-4 mb-3"> <p class="text-secondary">Copyright © Saud</p> </div> <div class="col-lg-4 mb-3 "> <!-- Button trigger modal --> <button type="button" class="btn btn-primary " data-toggle="modal" data-target="#exampleModal"> Contact Us </button> </div> <div class="col-lg-4 mb-3"> <ul class="list-inline quicklinks"> <li class="list-inline-item"> Privacy Policy </li> <li class="list-inline-item"> Terms of Use </li> </ul> </div> </div> </div> </footer>
Magento 1.9 : How to add HTML, BOOTSTRAP & CSS to static block?
Following are my responsive html code with bootstrap design, if i add to CMS->Page->Content my cms page look like collapsed, header and footer alignment issue. <!DOCTYPE html> <html lang="en"> <head> <title>Bootstrap Card</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script> </head> <body> <div class="container" style="font-size: larger;"> <h2>Kolupadi Manual</h2> <p>All kind of Kolu Padi Manual list</p> <h4 align="center"><u>3 Steps Kolupadi</u></h4> <div class="card-columns"> <div class="card bg-light"> <div class="card-body text-center"> 3 Compact Kolu Padi </div> </div> <div class="card bg-light"> <div class="card-body text-center"> <a href="https://abc.in/media/kolupadi-pdf/regular/3_regular_booklet_2017.pdf" class="card-text">3 Regular Kolupadi </a> </div> </div> <div class="card bg-light"> <div class="card-body text-center"> <a href="https://abc.in/media/kolupadi-pdf/triple/3_trible_booklet_2017.pdf" class="card-text">3 Triple Kolu Padi </a> </div> </div> </div> <br> <h4 align="center"><u>5 Steps Kolupadi</u></h4> <div class="card-columns"> <div class="card bg-light"> <div class="card-body text-center"> 5 Compact Kolu Padi </div> </div> <div class="card bg-light"> <div class="card-body text-center"> <a href="https://abc.in/media/kolupadi-pdf/regular/5_regular_booklet_2017.pdf" class="card-text">5 Regular Kolupadi </a> </div> </div> <div class="card bg-light"> <div class="card-body text-center"> <a href="https://abc.in/media/kolupadi-pdf/triple/5_triple_booklet_feb_2017.pdf" class="card-text">5 Triple Kolu Padi </a> </div> </div> </div> <br> <h4 align="center"><u>7 Steps Kolupadi</u></h4> <div class="card-columns"> <div class="card bg-light"> <div class="card-body text-center"> 7 Compact Kolu Padi </div> </div> <div class="card bg-light"> <div class="card-body text-center"> <a href="https://abc.in/media/kolupadi-pdf/regular/7_regular_booklet_2017.pdf" class="card-text">7 Regular Kolupadi </a> </div> </div> <div class="card bg-light"> <div class="card-body text-center"> <a href="https://abc.in/media/kolupadi-pdf/triple/7_triple_booklet_feb_2017.pdf" class="card-text">7 Triple Kolu Padi </a> </div> </div> </div> <br> <h4 align="center"><u>9 Steps Kolupadi</u></h4> <div class="card-columns"> <!-- <div class="card bg-light"> <div class="card-body text-center"> 3 Compact Kolu Padi </div> </div> --> <div class="card bg-light"> <div class="card-body text-center"> <a href="https://abc.in/media/kolupadi-pdf/regular/9_regular_booklet_2017.pdf" class="card-text">9 Regular Kolupadi </a> </div> </div> <div class="card bg-light"> <div class="card-body text-center"> <a href="https://abc.in/media/kolupadi-pdf/triple/9_triple_booklet_2017.pdf" class="card-text">9 Triple Kolu Padi </a> </div> </div> </div> <br> </div> </body> </html> If I directly add above code into CMS->Page->Content, header and footer alignment collapsed. What is the proper way to add my design to my block?