Content stuck to navbar - html

Photo of the page
I have my website's content somehow stuck to the navigation menu. I have tried putting it in a different div but nothing has worked for me so far, neither replacing the placing of the container class. I dont understand why the body's main content wont align underneath the navigational menu and be in its own section so that it doesn't leak out. Any help would be greatly appreciated.
* {
box-sizing: border-box;
}
html,
body {
margin: 0;
padding: 0;
height: 100%;
max-width: calc(100vw - 20px);
min-height: 100vh;
}
body {
width: 100%;
overflow-x: hidden;
}
#container {
min-height: 100%;
position: relative;
width: 100%;
}
main {
margin-left: 100px;
}
/*
html {
display: block;
}
/*
/* SCROLL BAR CSS STARTS */
body::-webkit-scrollbar {
width: 0.30rem;
}
body::-webkit-scrollbar-track {
background: #212429;
}
body::-webkit-scrollbar-thumb {
background: #fc3218;
}
/* SCROLL BAR CSS ENDS */
/* NAV BAR CSS STARTS */
.logo {
margin-right: 5px;
}
.my-nav {
position: absolute;
display: flex;
align-items: center;
justify-content: space-between;
padding: 15px;
}
.navbar-light .navbar-nav .nav-link {
color: white;
}
.navbar-nav>li {
padding-left: 35px;
padding-right: 55px;
float: none;
display: table-cell;
text-align: center;
font-size: 14px;
}
.navbar-light .navbar-nav .nav-link:focus,
.navbar-light .navbar-nav .nav-link:hover {
color: #fc3218;
}
.navbar-light .navbar-nav .nav-link:focus,
.navbar-light .navbar-nav .nav-link:active {
color: #fc3218;
}
.navbar {
margin-top: 0px;
margin-left: 10px;
width: 100%;
background: #22252a;
}
.dropdown-menu {
color: white;
background-color: #fc3218;
}
.dropdown-item {
color: white;
font-size: 12px;
}
/* NAV BAR CSS END */
/* SIDEBAR CSS STARTS */
.lateral-nav {
position: absolute;
top: 0;
left: 0;
width: 100px;
background: #fafafc;
height: 100vh;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
}
img {
width: 60px;
height: 45px;
margin-top: 3px;
}
.lateral-nav a {
writing-mode: vertical-lr;
text-orientation: mixed;
margin: 5px 0;
}
.socialbox {
position: fixed;
display: inline-block;
top: 50%;
left: 0;
width: 80px;
height: auto;
margin: -120px 0 0;
text-align: center;
}
.socialbox img {
display: inline-block;
width: 30px;
height: 30px;
padding: 5px;
margin: 4px;
box-sizing: border-box;
}
.socialbox::before {
content: "#Suivez-nous";
bottom: -180px;
left: -38px;
width: 150px;
font-size: 16px;
font-weight: 800;
letter-spacing: 0;
color: #000f33;
transform: rotate(-90deg);
}
.socialbox::after {
content: "";
bottom: -105px;
left: 50%;
width: 1px;
height: 110px;
margin: 0 0 0 -2px;
background-color: #dddee4;
}
.socialbox::after,
.socialbox::before {
position: absolute;
display: inline-block;
}
.fa {
display: inline-block;
font: normal normal normal 14px/1 FontAwesome;
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
transform: translate(0, 0);
}
.socialbox .fa {
font-size: 20px;
color: #000f33;
-webkit-transition: all .4s linear;
transition: all .4s linear;
}
/* SIDEBAR CSS ENDS */
/* CARD DECK START */
.card-deck {
width: 90%;
margin: auto;
}
/* CARD DECK END */
/* Footer start */
footer {
background: #16222A;
background: -webkit-linear-gradient(59deg, #3A6073, #16222A);
background: linear-gradient(59deg, #3A6073, #16222A);
color: white;
width: calc(100% - 85px);
margin-left: 100px;
margin-right: -15px;
}
footer a {
color: #fff;
font-size: 14px;
transition-duration: 0.2s;
}
footer a:hover {
color: #FA944B;
text-decoration: none;
}
.copy {
font-size: 12px;
padding: 10px;
border-top: 1px solid #FFFFFF;
}
.footer-middle {
padding-top: 2em;
color: white;
}
/* Footer social icons */
ul.social-network {
list-style: none;
display: inline;
margin-left: 0 !important;
padding: 0;
}
ul.social-network li {
display: inline;
margin: 0 5px;
}
.social-network a.icoFacebook:hover {
background-color: #3B5998;
}
.social-network a.icoLinkedin:hover {
background-color: #007bb7;
}
.social-network a.icoFacebook:hover i,
.social-network a.icoLinkedin:hover i {
color: #fff;
}
.social-network a.socialIcon:hover,
.socialHoverClass {
color: #44BCDD;
}
.social-circle li a {
display: inline-block;
position: relative;
margin: 0 auto 0 auto;
-moz-border-radius: 50%;
-webkit-border-radius: 50%;
border-radius: 50%;
text-align: center;
width: 30px;
height: 30px;
font-size: 15px;
}
.social-circle li i {
margin: 0;
line-height: 30px;
text-align: center;
}
.social-circle li a:hover i,
.triggeredHover {
-moz-transform: rotate(360deg);
-webkit-transform: rotate(360deg);
-ms--transform: rotate(360deg);
transform: rotate(360deg);
-webkit-transition: all 0.2s;
-moz-transition: all 0.2s;
-o-transition: all 0.2s;
-ms-transition: all 0.2s;
transition: all 0.2s;
}
.social-circle i {
color: #595959;
-webkit-transition: all 0.8s;
-moz-transition: all 0.8s;
-o-transition: all 0.8s;
-ms-transition: all 0.8s;
transition: all 0.8s;
}
.social-network a {
background-color: #F9F9F9;
}
/* Footer end */
<!DOCTYPE html>
<html lang="en">
<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="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link rel="canonical" href="https://getbootstrap.com/docs/4.0/examples/carousel/">
<link rel="stylesheet" href="style1.css">
<link rel="stylesheet" href="normalize.css">
<!-- Bootstrap core CSS -->
<link href="../../dist/css/bootstrap.min.css" rel="stylesheet">
<title>Hello, world!</title>
</head>
<body>
<div id="container">
<!-- Navigation menu -->
<header>
<nav class="my-nav navbar navbar-light navbar-expand-lg">
<button class="navbar-toggler" type="button" data-toggle="collapse" data- target="#navbarsExample08"
aria-controls="navbarsExample08" aria-expanded="false" aria- label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-md-center" id="navbarsExample08">
<ul class="navbar-nav">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="dropdown08" data-toggle="dropdown" aria- haspopup="true"
aria-expanded="false">ACTIVITES</a>
<div class="dropdown-menu" aria-labelledby="dropdown08">
<a class="dropdown-item" href="#">Rafting</a>
<a class="dropdown-item" href="#">Canooing</a>
<a class="dropdown-item" href="#">Parachute</a>
<a class="dropdown-item" href="#">Soufflerie</a>
<a class="dropdown-item" href="#">Saut elastique</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="#">OFFRES</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">EVENEMENTS</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">A PROPOS</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">ESPACE HANDICAP</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">CONTACT</a>
</li>
</ul>
</div>
</nav>
</header>
<!-- Navigation menu -->
<!-- Sidebar menu -->
<div class="lateral-nav position-fixed">
<img class="logo" src="./img/so.png" alt="">
<div class="socialbox ">
<img class="fa fa-facebook" src="./img/facebook.png" alt="">
<img class="fa fa-twitter" src="./img/twitter.png" alt="">
<img class="fa fa-youtube" src="./img/youtube.png" alt="">
</div>
</div>
<!-- Sidebar menu -->
<!-- Website Content -->
<main>
<section>
<!-- NOS ACTIVITES START -->
<h2 class="text-center">NOS ACTIVITES</h2>
<div class="card-deck ">
<div class="card text-center" style="width: 18rem;">
<div class="card-body rafting">
<h5 class="card-title">RAFTING</h5>
RÉSERVEZ
</div>
</div>
<div class="card text-center" style="width: 18rem; height: 15rem;">
<div class="card-body canooing">
<h5 class="card-title">CANNOING</h5>
RÉSERVEZ
</div>
</div>
<div class="card text-center" style="width: 18rem;">
<div class="card-body parachute">
<h5 class="card-title">PARACHUTE</h5>
RÉSERVEZ
</div>
</div>
<div class="card text-center" style="width: 18rem;">
<div class="card-body soufflerie">
<h5 class="card-title">SOUFFLERIE</h5>
RÉSERVEZ
</div>
</div>
<div class="card text-center" style="width: 18rem;">
<div class="card-body saut-elastique">
<h5 class="card-title">SAUT ELASTIQUE</h5>
RÉSERVEZ
</div>
</div>
</div>
<!-- NOS ACTIVITES END -->
</section>
</main>
</div>
<!-- Footer Start -->
<footer class="mainfooter" role="contentinfo">
<div class="footer-middle">
<div class="container">
<div class="row">
<div class="col-md-3 col-sm-6">
<!--Column1-->
<div class="footer-pad">
<h4>Heading 1</h4>
<ul class="list-unstyled">
<li></li>
<li>Payment Center</li>
<li>Contact Directory</li>
<li>Forms</li>
<li>News and Updates</li>
<li>FAQs</li>
</ul>
</div>
</div>
<div class="col-md-3 col-sm-6">
<!--Column1-->
<div class="footer-pad">
<h4>Heading 2</h4>
<ul class="list-unstyled">
<li>Website Tutorial</li>
<li>Accessibility</li>
<li>Disclaimer</li>
<li>Privacy Policy</li>
<li>FAQs</li>
<li>Webmaster</li>
</ul>
</div>
</div>
<div class="col-md-3 col-sm-6">
<!--Column1-->
<div class="footer-pad">
<h4>Heading 3</h4>
<ul class="list-unstyled">
<li>Parks and Recreation</li>
<li>Public Works</li>
<li>Police Department</li>
<li>Fire</li>
<li>Mayor and City Council</li>
<li>
</li>
</ul>
</div>
</div>
<div class="col-md-3">
<h4>Follow Us</h4>
<ul class="social-network social-circle">
<li><i class="fa fa-facebook"></i></li>
<li><i class="fa fa-linkedin"></i></li>
</ul>
</div>
</div>
<div class="row">
<div class="col-md-12 copy">
<p class="text-center">© Copyright 2018 - Company Name. All rights reserved.</p>
</div>
</div>
</div>
</div>
</footer>
<!-- Footer Ends -->
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<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://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous">
</script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous">
</script>
</body>
</html>

This is because of the position: absolute on .my-nav element. Just remove that or change it to relative and you should be good

Why do you use position: absolute for the my-nav? What position: absolute or fixed does, it pulls out the element (my-nav) from the document context. If you check this and debug in your browser, you can see that the header has height equal to 0.
In order to fix the card-deck layout, just simply remove the position absolute.
If you want the menu, to be visible when you scroll down the page, consider putting position: sticky on the header.
like:
header {
position: sticky;
top: 0; // need to apply top and left for position sticky to work
left: 0;
z-index: 5; // z-index, so it is at the top
}
.my-nav {
display: flex;
align-items: center;
justify-content: space-between;
padding: 15px;
}

You can add padding to the top of the div which contains the card deck :
.card-deck {
width: 90%;
margin: auto;
padding-top:50px;
}
for the heading to move down edit this part in HTML file:
<h2 style="padding-top:40px;" class="text-center">NOS ACTIVITES</h2>

Related

Problems aligning button on timeline with CSS

I would like to align the two buttons on the middle line and also align the white balls on the line, I've tried using position with CSS but I didn't succeed, I'm not good at design, and I also don't know how to be responsive on all devices
Could someone please help me? I don't know what to do to adjust this
I don't think it is the best approach, but could be considered as an option
Try modifying the left value of the following:
.tabs_inner .tab-content .tab-pane .list:before {
left: 50.5% // was 46%
}
This would fix your issue until the screen size gets lower than 500px. You might have to change the left value again for the lower screen sizes.
Hope this helped!
<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="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<style>
.mytabs_area {
background-image: -moz-linear-gradient(0deg, #766dff 0%, #88f3ff 100%);
background-image: -webkit-linear-gradient(0deg, #766dff 0%, #88f3ff 100%);
background-image: -ms-linear-gradient(0deg, #766dff 0%, #88f3ff 100%);
}
.p_120 {
padding-top: 120px;
padding-bottom: 120px;
}
#media (max-width: 575px) {
.p_120 {
padding-top: 70px;
padding-bottom: 70px;
}
}
.tabs_inner .nav.nav-tabs {
display: block;
text-align: center;
border: none;
margin-bottom: 120px;
}
.tabs_inner .nav.nav-tabs li {
display: inline-block;
margin-right: 8px;
}
.tabs_inner .nav.nav-tabs li a {
margin: 0px;
line-height: 50px;
border-radius: 5px;
padding: 0px 40px;
font-size: 13px;
font-weight: 500;
color: #fff;
font-family: "Roboto", sans-serif;
border: 1px solid #9ab5f5;
background: rgba(255, 255, 255, 0.1);
}
.tabs_inner .nav.nav-tabs li a.active {
background: #fff;
color: #222222;
}
.tabs_inner .tab-content .tab-pane .list {
max-width: 460px;
margin: auto;
position: relative;
padding-top: 40px;
padding-bottom: 60px;
}
.tabs_inner .tab-content .tab-pane .list:before {
content: "";
height: 100%;
width: 5px;
background: rgba(255, 255, 255, 0.2);
position: absolute;
left: 46%;
transform: translateX(-50%);
top: -5px;
}
.tabs_inner .tab-content .tab-pane .list li {
margin-bottom: 60px;
position: relative;
}
.tabs_inner .tab-content .tab-pane .list li span {
height: 15px;
width: 15px;
border-radius: 50%;
display: block;
background: rgba(255, 255, 255, 0.2);
position: relative;
left: 8.6rem;
top: 2.1rem;
transform: translateX(-50%);
}
.tabs_inner .tab-content .tab-pane .list li span:before {
content: '';
height: 7px;
width: 7px;
background: #fff;
border-radius: 50%;
position: absolute;
left: 52%;
top: 4px;
transform: translateX(-50%);
}
.tabs_inner .tab-content .tab-pane .list li:last-child {
margin-bottom: 0px;
}
.tabs_inner .tab-content .tab-pane .list li .media .d-flex {
padding-right: 100px;
}
.tabs_inner .tab-content .tab-pane .list li .media .d-flex p {
color: rgba(255, 255, 255, 0.75);
margin-bottom: 0px;
padding-top: 20px;
position: relative;
right: 2rem;
}
.tabs_inner .tab-content .tab-pane .list li .media .media-body h4 {
color: #fff;
font-size: 21px;
text-transform: uppercase;
margin-bottom: 20px;
}
.tabs_inner .tab-content .tab-pane .list li .media .media-body p {
color: rgba(255, 255, 255, 0.75);
margin-bottom: 0px;
}
.tabs_inner .tab-content .tab-pane .list li .media .media-body h4 {
color: #fff;
font-size: 21px;
text-transform: uppercase;
margin-bottom: 20px;
}
.tabs_inner .tab-content .tab-pane .list li .media .d-flex p {
color: rgba(255, 255, 255, 0.75);
margin-bottom: 0px;
padding-top: 20px;
}
</style>
<title>Hello, world!</title>
</head>
<body>
<h1>Hello, world!</h1>
<section class="mytabs_area p_120">
<div class="container">
<div class="tabs_inner">
<ul class="nav nav-tabs" id="myTab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="home-tab" data-toggle="tab" href="#home" role="tab"
aria-controls="home" aria-selected="true">My Experiences</a>
</li>
<li class="nav-item">
<a class="nav-link" id="profile-tab" data-toggle="tab" href="#profile" role="tab"
aria-controls="profile" aria-selected="false">My Education</a>
</li>
</ul>
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">
<ul class="list">
<li>
<span></span>
<div class="media">
<div class="d-flex">
<p>March 2017 to present</p>
</div>
<div class="media-body">
<h4>Colorlib</h4>
<p>Senior Web Developer <br />Santa monica, Los angeles</p>
</div>
</div>
</li>
<li>
<span></span>
<div class="media">
<div class="d-flex">
<p>March 2017 to present</p>
</div>
<div class="media-body">
<h4>Colorlib</h4>
<p>Senior Web Developer <br />Santa monica, Los angeles</p>
</div>
</div>
</li>
<li>
<span></span>
<div class="media">
<div class="d-flex">
<p>March 2017 to present</p>
</div>
<div class="media-body">
<h4>Colorlib</h4>
<p>Senior Web Developer <br />Santa monica, Los angeles</p>
</div>
</div>
</li>
</ul>
</div>
<div class="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab">
<ul class="list">
<li>
<span></span>
<div class="media">
<div class="d-flex">
<p>March 2017 to present</p>
</div>
<div class="media-body">
<h4>Colorlib</h4>
<p>Senior Web Developer <br />Santa monica, Los angeles</p>
</div>
</div>
</li>
<li>
<span></span>
<div class="media">
<div class="d-flex">
<p>March 2017 to present</p>
</div>
<div class="media-body">
<h4>Colorlib</h4>
<p>Senior Web Developer <br />Santa monica, Los angeles</p>
</div>
</div>
</li>
<li>
<span></span>
<div class="media">
<div class="d-flex">
<p>March 2017 to present</p>
</div>
<div class="media-body">
<h4>Colorlib</h4>
<p>Senior Web Developer <br />Santa monica, Los angeles</p>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
</section>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous">
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"
integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous">
</script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous">
</script>
</body>
</html>
Code updated: Just swap with yours.
Explanation:
I have changed the position of the text and the white button to relative and replace it on aligned form.

Both top and bottom website Navigation Bar is not functioning properly even after using the same CSS

I have completed coding Main webpage, which looks like this:
By using the same HTML and linking with the same CSS, I have created the Photography HTML by deleting the main car image and inserting the images made with Carousel slide effect.
However, even though I am using the same CSS with same HTML format, the navigation bar is acting weird, as shown below:
As shown, the top right navigation has moved to the left while the bottom icon images not showing, but only with white background...
I thought it has to do with the image size inside Carousel, so I have adjusted the size, but nothing is working properly.
HTML Main Webpage:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="monday.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<title>J[a]son</title>
</head>
<body>
<nav>
<div class = "logo">
<h4>J[a]son</h4>
</div>
<ul class = "nav-links">
<li>
HOME
</li>
<li>
PHOTOGRAPHY
<ul class="sub-menu">
<li>Colour</li>
<li>Black</li>
</ul>
</li>
<li>
CODING
</li>
<li>
ABOUT
</li>
</ul>
<div class= "burger">
<div class="line1"></div>
<div class="line2"></div>
<div class="line3"></div>
</div>
</nav>
<script src="testing.js"></script>
<div class="main_car_wrapper">
<img class="main_car" src="Photos/main_car.jpg" alt="car" width="100%" height="100%"/>
</div>
<!--<p>June, 2020. Sunshine Coast, BC, Canada </p>-->
<div class ="bottom">
<div class = "logos">
<p id = "paragraph">TESTING</p>
</div>
</div>
</body>
</html>
HTML Photography:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="monday.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap#4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<title>J[a]son</title>
</head>
<body>
<nav>
<div class = "logo">
<h4>J[a]son</h4>
</div>
<ul class = "nav-links">
<li>
HOME
</li>
<li>
PHOTOGRAPHY
<ul class="sub-menu">
<li>Colour</li>
<li>Black</li>
</ul>
</li>
<li>
CODING
</li>
<li>
ABOUT
</li>
</ul>
<div class= "burger">
<div class="line1"></div>
<div class="line2"></div>
<div class="line3"></div>
</div>
</nav>
<script src="testing.js"></script>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#4.5.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx" crossorigin="anonymous"></script>
<!--<div id="carouselExampleControls" class="carousel slide" data-ride="carousel">-->
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item active">
<img class="d-block w-75" src="Photos/carousel.JPG" alt="First slide">
<p>November, 2019. Seattle, USA.</p>
</div>
<div class="carousel-item">
<img class="d-block w-75" src="Photos/statute.JPG" alt="Second slide">
<p>June, 2020. Kelowna, BC.</p>
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
<div class ="bottom">
<div class = "logos">
</div>
</div>
</body>
</html>
CSS (use it for all HTML):
* {
margin: 0px;
padding: 0px;
box-sizing: border-box;
}
body {
background-color: black; /*rgb(241, 233, 233);*/
display: flex;
flex-direction: column;
min-height: 100vh;
}
nav {
display: flex;
justify-content: space-between;
/*padding-right: 2em;*/
padding-left: 2em;
padding-top: 2em;
padding-bottom: 1.5em;
align-items: center;
min-height: 8vh;
background-color: black;
/*font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;*/
font-family: 'Poppins', sans-serif;
}
.logo {
background-color: black;
color: rgb(240, 235, 235);
font-size: 20px;
text-transform: uppercase;
letter-spacing: 5px;
}
.nav-links {
display: flex;
justify-content: space-around;
width: 30%;
}
.nav-links li {
list-style: none;
}
.nav-links a {
color: white;
text-decoration: none;
letter-spacing: 1px;
font-weight: bold;
font-size: 11px;
/*padding: 5px 5px;*/
}
.burger {
display: none;
cursor: pointer;
}
.burger div {
width: 25px;
height: 3px;
background-color: white;
margin: 5px;
transition: all 0.3s ease;
}
#media screen and (max-width:1430px) {
.nav-links {
width: 40%;
}
}
#media screen and (max-width:950px) {
body {
overflow-x: hidden;
}
.nav-links {
position: absolute;
right: 0px;
height: 92vh;
top: 8vh;
background-color: black;
display: flex;
flex-direction: column;
align-items: center;
width: 45%;
transform: translateX(100%);
padding-right: 2em;
transition: transform 0.5s ease-in;
}
.nav-links li {
opacity: 0;
}
.burger {
display: block;
padding-right: 1em;
}
.sub-menu {
position: relative;
}
}
.nav-active {
transform: translate(0%);https://ahweb.org.uk/car.png
}
.main_car_wrapper {
background-image: url(https://ahweb.org.uk/car.png);
background-repeat: no-repeat no-repeat;
background-position: center center;
background-size: contain;
max-width: 100%;
height: auto;
padding-top: 6em;
}
#keyframes navLinkFade {
from {
opacity: 0;
transform: translateX(50px);
}
to {
opacity :1;
transform: translateX(0px);
}
}
.toggle .line1 {
transform: rotate(-45deg) translate(-5px, 6px);
}
.toggle .line2 {
opacity: 0;
}
.toggle .line3 {
transform: rotate(45deg) translate(-5px, -6px);
}
.sub-menu {
display: none;
}
.sub-menu li a {
/*display: block;*/
text-decoration: none;
color: white;
border-top: 1px solid white;
background: rgb(221, 215, 215);
white-space: nowrap;
top: 40px;
left: 25px;
padding: 5px;
padding-top: 1px;
}
.sub-menu li a:hover{
background: rgb(10, 10, 10);
opacity: 1;
transition: all 0.5s ease;
}
li:hover ul {
display: flex;
position: absolute;
}
li:hover li {
float: none;
font-size: 8px;
}
li:hover a {
background: rgb(5, 5, 5);
}
li:hover li a:hover {
background: rgb(19, 18, 18);
}
.bottom {
margin-top: auto;
}
.logos {
display: flex;
flex-direction: row;
}
.logos a {
color: white;
text-align: center;
padding: 14px;
text-decoration: none;
font-size: 17px;
}
.carousel-inner p {
text-align: center;
color: black;
font-size: 14px;
}
.carousel-inner {
background-color: black;
}
.carousel-inner img {
display: block;
margin: 0 auto;
width: 60vw;
max-height: auto;
align-items: center;
}
.carousel-control-prev-icon {
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3E%3Cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3E%3C/svg%3E");
}
.carousel-control-next-icon {
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3E%3Cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3E%3C/svg%3E");
}
JavaScript
const navSlide = () => {
const burger = document.querySelector('.burger');
const nav = document.querySelector('.nav-links');
const navLinks = document.querySelectorAll('.nav-links li');
//Toggle Nav
burger.addEventListener('click', () => {
//Toggle Nav
nav.classList.toggle('nav-active');
//Animate Links
navLinks.forEach((link, index) => {
if(link.style.animation) {
link.style.animation = ''
} else {
link.style.animation = `navLinkFade 0.2s ease forwards ${index / 7 + 0.5}s`;
}
});
//Burger Animation
burger.classList.toggle('toggle');
});
//Animate Links
}
navSlide();
The issue is caused by your HTML use a different style for nav element.
Change nav to display as flex should solve the issue.
HTML Main Webpage
nav element display as flex.
HTML Photography
nav element display as a block. This is because you used the bootstrap lib.

Bootstrap 4 Full Screen Desktop -columns fill remaining space

I am trying to make a full screen layout using bootstrap 4, like this:
100% height and width
My issue is that the left and right column (between nav and footer) are not taking up the remaining space. Secondly I would need to center that content within the column. I have played around with giving those sections fixed heights of (90vh) but then I am writing a lot of workaround code for mobile/tablet. Is there any solution for this that I am missing, probably something painstakingly obvious!
Any help is appreciated, thanks!
body {
font-family: 'Montserrat', sans-serif;
background-color: #fcfcfc;
}
.navbar-colored{
background-color: rgba(255,255,255,0.9) !important; /*#94a7b7*/
box-shadow: 1px 1px 10px rgba(0,0,0,0.15);
opacity: 1;
animation-name: fadeInOpacity;
animation-iteration-count: 1;
animation-timing-function: linear;
animation-duration: 1.0s;
}
.nav-item {
opacity: 1;
animation-name: fadeInOpacity;
animation-iteration-count: 1;
animation-timing-function: linear;
animation-duration: 1.1s;
}
#keyframes fadeInOpacity {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.nav-item a {
color: rgba(17,17,17,0.85);
}
.cart-icon {
padding-right: .75rem;
}
.cart-icon strong {
border-radius: 0;
font-weight: bold;
margin: .3em 0;
border: 2px solid #446084;
color: #0062A8;
position: relative;
display: inline-block;
vertical-align: middle;
text-align: center;
font-size: 1em;
}
.navbar{
position:fixed;
width:100%;
background color: transparent;
z-index:10;
flex-wrap: nowrap;
padding: 0.8rem 1.0rem;
}
.navbar-light .navbar-toggler {
border:none;
}
.row .no-pad {
margin-left: 0px;
}
.color-img-col {
padding-left: 20px;
padding-right: 20px;
}
.col-right {
background-color: #e6e6e6;
padding-left: 4%;
padding-right: 4%;
}
.col-left {
background-color: #fcfcfc;
}
.col-lg-4 .steps-small li {
padding-top: 10px;
}
.builder-color-img {
max-width: 80%;
}
.left-content {
margin-left: 9vw;
width: 72%;
}
[data-attribute-link] {
cursor: pointer;
}
.builder-checkout {
background-color: #0062a86b /*#7e94a78c*/;
}
.product-gallery {
background-color: #e6e6e6;
}
/*Builder Main Header / Navigation*/
.builder-header h1 {
font-size: 30px;
font-family: 'Montserrat', sans-serif;
font-weight: 300;
color: #202020;
padding-bottom: 17px;
}
.builder-header hr {
color: #9b9b9b;
margin-top: 0px;
margin-bottom: 0px;
}
h2.builder-step-title {
font-size: 18px;
font-family: 'Montserrat', sans-serif;
font-weight: 500;
font-style: italic;
color: #202020;
padding-top: 40px;
}
.steps-small {
padding-bottom: 25px;
}
.steps-small ul {
list-style-type: none;
overflow: hidden;
padding-left: 0px;
cursor: pointer;
}
.steps-small .active {
color: #0062A8;
font-weight: 500;
}
.steps-small :hover {
color: #0062A8;
}
.steps-small li {
float: left;
font-size: 15px;
font-family: 'Montserrat', sans-serif;
color: #8a8a8a;
padding-right: 10px;
}
.steps-small img {
width: 20px;
height: 10px;
padding-left:5px;
padding-right:3px;
}
/*Builder Bar*/
.review-bar {
background-color: #0062a8d9 /*#94a7b7*/;
color: white;
text-transform: uppercase;
padding-left: 9vw;
}
.picker-header {
float:left;
font-weight: 200;
font-size: 15px;
padding-left: 7px;
}
span[data-product-attribute-variation-result] {
font-weight: 500;
font-size: 15px;
padding-left: 5px;
}
.pa_color, .pa_neck, .pa_hem, .pa_size, .pa_body, .builder-checkout {
padding-top: 3.5vh;
padding-bottom: 3.5vh;
cursor: pointer;
}
.review-bar .pa_color:hover, .review-bar .pa_neck:hover, .review-bar .pa_hem:hover, .review-bar .pa_size:hover, .review-bar .pa_body:hover {
/*box-shadow: inset 0 0 10px #0062A8;*/
box-shadow: 0 0 8px #0062A8;
}
.builder-checkout:hover {
box-shadow: inset 0 0 10px #0062A8;
}
/*color Screen*/
.white-color-btn, .black-color-btn, .navy-color-btn, .grey-color-btn {
height: 30px;
width: 30px;
border-radius: 30px;
border:1px solid black;
}
/*Next Button*/
.next-btn {
font-size: 14px;
border-radius: 30px;
padding: 15px 50px 15px 50px;
font-weight: 200;
color: #202020;
border: 1px solid #202020;
}
.next-btn:hover {
background-color: #202020;
color: white;
}
.next-btn img {
width: 26px;
height: 10px;
padding-left:10px;
}
.review-bar img {
width: 15px;
height: 15px;
float: left;
margin-top: 3px;
}
.next-btn:hover {
color: white;
}
.image-gallery {
display: flex;
align-items: center;
flex-wrap: wrap;
overflow: hidden;
overflow-y: scroll;
}
.image-gallery img {
padding: 20px 0px;
}
.carousel-indicators li {
text-indent: 0px;
}
.selection-button-top {
padding-top: 50px;
padding-left: 0px;
}
.selection-button-bottom {
padding-bottom: 50px;
padding-top: 30px;
padding-left: 0px;
}
.selection-button {
padding-top: 30px;
padding-left: 15px;
padding-left: 0px;
}
.circle-btn {
border-radius: 30px;
height: 30px;
width: 30px;
text-indent: 40px;
cursor: pointer;
background-color: transparent;
color: #202020;
border: 1px solid #202020;
}
.circle-btn:hover {
border: 1px solid #3ca0e7;
font-weight: 500;
background-color: #202020;
}
.container-fluid .review-bar {
-webkit-overflow-scrolling: touch;
}
.nav-link {
padding: .5rem;
position: relative;
text-decoration: none;
cursor: pointer;
margin-left: 2rem;
margin-right: 2rem;
}
.nav-link:hover {
font-weight: 500;
}
.nav-link:before {
content: "";
position: absolute;
width: 100%;
height: 2px;
bottom: 0;
left: 0;
background-color: #0062A8;
visibility: hidden;
-webkit-transform: scaleX(0);
transform: scaleX(0);
-webkit-transition: all 0.3s ease-in-out 0s;
transition: all 0.3s ease-in-out 0s;
}
.nav-link:hover:before {
visibility: visible;
-webkit-transform: scaleX(1);
transform: scaleX(1);
}
.steps-small li {
padding-top: 10px;
}
<!doctype html>
<html lang="en">
<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="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
<!-- <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"> -->
<link rel="stylesheet" type="text/css" href="buildertwo.css">
<link href="https://fonts.googleapis.com/css?family=Montserrat:100,200,300,400,500,500i|Poppins:400,500" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/open-iconic/1.1.1/font/css/open-iconic-bootstrap.css" rel="stylesheet">
<title>OneTee Builder 2.0</title>
</head>
<body>
<nav class="navbar navbar-light">
<button class="navbar-toggler x-button" type="button" data-toggle="collapse" data-target="#navbarsmall" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<div class="x-icon"><span></span><span></span><span></span><span></span></div>
</button>
<div class="collapse navbar-collapse" id="navbarsmall">
<ul class="nav justify-content-center">
<li class="nav-item">
<a class="nav-link" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Sizing</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Shipping</a>
</li>
</ul>
</div>
<div class="cart-item has-icon">
<a href="https://onetee.shop/cart/" title="Cart" class="header-cart-link is-small">
<span class="cart-icon image-icon">
<strong>0</strong>
</span>
</a>
</div>
</nav>
<div id="carouselBuilder" class="carousel slide carousel-fade" data-interval="false">
<div class="carousel-inner">
<div class="carousel-item active" data-product-attribute="pa_color" data-slide-number="1">
<div class="container-fluid">
<div class="row main-row align-items-center">
<div class="col-sm-12 col-lg-6 col-left">
<div class="left-content">
<div class="builder-header no-sm-mobile">
<h1>Build your shirt</h1>
<div class="steps-small">
<ul>
<li data-target="#carouselBuilder" data-slide-to="0" class="active">Color<img src="next.png" class="next-arrow" alt="next" /></li>
<li data-target="#carouselBuilder" data-slide-to="1">Neck<img src="next.png" class="next-arrow" alt="next" /></li>
<li data-target="#carouselBuilder" data-slide-to="2">Hem<img src="next.png" class="next-arrow" alt="next" /></li>
<li data-target="#carouselBuilder" data-slide-to="3">Size<img src="next.png" class="next-arrow" alt="next" /></li>
<li data-target="#carouselBuilder" data-slide-to="4">Body<img src="next.png" class="next-arrow" alt="next" /></li>
<li data-target="#carouselBuilder" data-slide-to="5">Checkout</li>
</ul>
</div>
<hr>
</div>
<h2 class="builder-step-title">Step 1. Select Your Colour</h2>
<div class="selection-button-top">
<button class="button circle-btn black-btn white-trigger" data-product-attribute="pa_color" data-product-attribute-variation="black">black</button>
</div>
<div class="selection-button-bottom">
<button class="button circle-btn white-btn white-trigger" data-product-attribute="pa_color" data-product-attribute-variation="white">white</button>
</div>
<button type="button" class="btn next-btn" data-target="#carouselBuilder" data-slide-to="1">Next<img src="next.png" class="next-arrow" alt="next" /></button>
</div>
</div>
<div class="col-sm-12 col-lg-6 col-right text-center align-self-center">
<div class="right-content">
<img class=" img-fluid" alt="Responsive image" src="black.png">
</div>
</div>
</div>
</div>
</div>
<div class="carousel-item" data-product-attribute="pa_neck" data-slide-number="2">
<div class="container-fluid">
<div class="row main-row align-items-center">
<div class="col-sm-12 col-lg-6 col-left">
<div class="left-content">
<div class="builder-header no-sm-mobile">
<h1>Build your shirt</h1>
<div class="steps-small">
<ul>
<li data-target="#carouselBuilder" data-slide-to="0">Color<img src="next.png" class="next-arrow" alt="next" /></li>
<li data-target="#carouselBuilder" data-slide-to="1" class="active">Neck<img src="next.png" class="next-arrow" alt="next" /></li>
<li data-target="#carouselBuilder" data-slide-to="2">Hem<img src="next.png" class="next-arrow" alt="next" /></li>
<li data-target="#carouselBuilder" data-slide-to="3">Size<img src="next.png" class="next-arrow" alt="next" /></li>
<li data-target="#carouselBuilder" data-slide-to="4">Body<img src="next.png" class="next-arrow" alt="next" /></li>
<li data-target="#carouselBuilder" data-slide-to="5">Checkout</li>
</ul>
</div>
<hr>
</div>
<h2 class="builder-step-title">Step 2. Select Your Neck Line</h2>
<div class="col-12 selection-button-top">
<button class="button circle-btn black-btn white-trigger" data-product-attribute="pa_neck" data-product-attribute-variation="crew">crewneck</button>
</div>
<div class="col-12 selection-button-bottom">
<button class="button circle-btn white-btn white-trigger" data-product-attribute="pa_neck" data-product-attribute-variation="v-neck">vneck</button>
</div>
<button type="button" class="btn next-btn" data-target="#carouselBuilder" data-slide-to="2">Next<img src="next.png" class="next-arrow" alt="next" /></button>
</div>
</div>
<div class="col-sm-12 col-lg-6 col-right text-center align-self-center">
<div class="right-content">
<img class=" img-fluid neck-img" alt="Responsive image" src="v-neck-black.png">
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Bottom Bar -->
<div class="container-fluid review-bar">
<div class="row flex-row flex-nowrap">
<div class="pa_color col-3 col-lg-2 d-flex justify-content-center" data-target="#carouselBuilder" data-slide-to="0">
<img src="tick-inside-circle.png" class="tick-circle" alt="" />
<div class="picker-header">Colour:<span data-product-attribute-variation-result="">Black</span>
</div>
</div>
<div class="pa_neck col-3 col-lg-2 d-flex justify-content-center" data-target="#carouselBuilder" data-slide-to="1">
<img src="tick-inside-circle.png" class="tick-circle" alt="" />
<div class="picker-header">Neck:<span data-product-attribute-variation-result="">Crew</span>
</div>
</div>
<div class="pa_hem col-3 col-lg-2 d-flex justify-content-center" data-target="#carouselBuilder" data-slide-to="2">
<img src="tick-inside-circle.png" class="tick-circle" alt="" />
<div class="picker-header">Hem:<span data-product-attribute-variation-result="">Straight</span>
</div>
</div>
<div class="pa_size col-3 col-lg-2 d-flex justify-content-center" data-target="#carouselBuilder" data-slide-to="3">
<img src="tick-inside-circle.png" class="tick-circle" alt="" />
<div class="picker-header">Size:<span data-product-attribute-variation-result="">L</span>
</div>
</div>
<div class="pa_body col-3 col-lg-2 d-flex justify-content-center" data-target="#carouselBuilder" data-slide-to="4">
<img src="tick-inside-circle.png" class="tick-circle" alt="" />
<div class="picker-header">Body:<span data-product-attribute-variation-result="">Slim</span>
</div>
</div>
<div class="builder-checkout col-4 col-lg-2 d-flex justify-content-center" data-target="#carouselBuilder" data-slide-to="5">
<div class="picker-header">Checkout
</div>
</div>
</div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
<script src="js/boostrap.min.js" type="text/javascript"></script>
<script type="text/javascript" src="buildertwo.js"></script>
</body>
</html>
I hope this helps. This is a really simple explanation, but I trust that you can implement this into your code. The problem with your columns is that they are not the correct height. They are too short, so even after the review bar is added under the columns, there is still a bunch of space.
This is how I would solve it. you can use the calc() function built in css. You can see me using it in my solution below. If you know the height of the review-bar ahead of time, you can just subtract that from 100vh or 100% (I'm using 100vh).
I'm assuming that the review bar is 50px, but of course, it can be different. This implementation works with any screen size. If you run the snippet, go full screen, and adjust the screen size, you'll see the top-content will adjust itself and push the review bar to the bottom.
So try to implement this into your code and see if it works! If it doesn't I'll keep trying to help. And if this is not the solution you're looking for, I apologize.
Also, welcome to Stack Overflow! It says here that you're a new user.
* {
margin: 0;
padding: 0;
}
.top-content {
width: 100%;
height: calc(100vh - 50px);
background-color: blue;
}
.review-bar {
width: 100%;
height: 50px;
background-color: green;
}
<div class='top-content'>
This content here would be your two columns
</div>
<div class='review-bar'>
This, of course, would be your review bar
</div>

How to make image of footer responsive to mobile devices?

In my project I have footer with image as background.
I set it inside css. You can see it below. It looks nice only in big screen devices but ugly in mobile screen. How to make image responsive?
I don't have much experience in frontend and I would like to know what are the options?
I use bootstrap 4 by the way.
Here the link to jsfiddle.
/*
* START: Footer
*/
footer {
background: url('http://enjoyjumping.kz/static/img//footer.png') no-repeat;
background-size: 100% 100%;
width: 100%;
height: 500px;
bottom: 0;
position: absolute;
}
footer .row {
align-items: flex-end;
}
.flex-container {
display: flex;
flex-direction: column;
}
.flex-container > div {
width: 100px;
margin: 10px;
text-align: center;
line-height: 75px;
font-size: 30px;
}
.social {
display: flex;
justify-content: center;
flex-wrap: wrap;
}
.social__button {
display: block;
width: 70px;
height: 70px;
border-radius: 100%;
border-color: #fff;
position: relative;
cursor: pointer;
margin: 5px;
text-align: center;
}
.social__button i {
display: inline-block;
position: absolute;
left: 0;
top: 0;
height: 70px;
line-height: 70px;
width: 70px;
font-size: 30px;
z-index: 2;
transition: 0.3s;
color: black;
border: 2px solid;
border-radius: 100%;
}
.social__button i:hover {
color: white;
}
.copyright {
margin-bottom: 2.1rem !important;
font-size: 18px;
font-weight: bold;
}
.menu-link {
color: black !important;
font-weight: bold;
}
.menu-link-li {
margin: 10px;
}
.footer-menu {
margin-bottom: 0.7rem !important;
}
/*
* END: Footer
*/
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<footer>
<div class="container-fluid h-100">
<div class="row h-100">
<div class="col-sm text-center footer-menu">
<ul class="list-unstyled">
<li class="menu-link-li">
<a class="menu-link no-underline text-uppercase" href="/about/">About Us</a>
</li>
<li class="menu-link-li">
<a class="menu-link no-underline text-uppercase" data-toggle="modal" data-target="#citiesModel" style="cursor: pointer;">Our clubs</a>
</li>
<li class="menu-link-li">
<a class="menu-link no-underline text-uppercase" href="/coaches/">News</a>
</li>
<li class="menu-link-li">
<a class="menu-link no-underline text-uppercase" href="/bonus/">Events</a>
</li>
</ul>
</div>
<div class="col-sm text-center">
<div class="flex-container">
<div class="w-100">
<div class="social">
<a href="#" class="social__button facebook">
<i class="fa fa-facebook"></i>
</a>
<a href="#" class="social__button instagram">
<i class="fa fa-instagram"></i>
</a>
<a href="#" class="social__button vk">
<i class="fa fa-vk"></i>
</a>
<a href="#" class="social__button youtube">
<i class="fa fa-youtube-play"></i>
</a>
</div>
</div>
<div class="w-100">
<span>+7(701)</span><strong>262-47-50</strong>
</div>
</div>
</div>
<div class="col-sm text-center">
<p class="copyright">Copyright © 2018 example.com</p>
</div>
</div>
</div>
</footer>
You need to change the background-size and background-position attributes of <footer>:
footer {
background: url('http://enjoyjumping.kz/static/img/footer.png') no-repeat top center /cover;
}
See it working: https://jsfiddle.net/7mejchb8/11/
Edit, based on comments: See this example on how to keep footer glued to the bottom of the page on all devices, while allowing it to have a variable height, without using position:absolute: https://jsfiddle.net/websiter/d4n1sxop/
CSS behind it is:
body {
min-height: 100vh;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
}
header {
flex-grow: 0;
}
main {
flex-grow: 1;
}
footer {
flex-grow: 0;
display: flex;
flex-direction: column;
justify-content: flex-end;
min-height: 500px;
}

Bootstrap row-fluid doesn't nest side by side?

I am trying to divide row into 2 (span4 & span8) but couldn't manage so far. The second div (span8) slides down. What I am missing?
Here is my related markup:
<section id="products" data-direction="from-left">
<div class="container">
<h1>
<span lang="tr">ÜRÜNLERİMİZ</span>
</h1>
<div class="container-fluid">
<div class="row-fluid">
<div class="span12">
<div class="carousel slide" id="myCarousel">
<div class="carousel-inner">
<div class="row-fluid item active">
<div class="bannerImage">
<img src="images/waspmote_pro_t.png" alt="">
<img src="images/waspmote_exp_radio_board_2-375_t.png" alt="">
<img src="images/u13_gw_t.png" alt="">
</div>
<div class="caption row-fluid">
<div class="span12">
<h3>Waspmote</h3>
</div>
<div class="row-fluid">
<div class="span4">
<ul style="list-style-type: none;">
<li><i class="fa fa-share-alt"></i> Connect any sensor</li>
<li><i class="fa fa-rss"></i> Using any wireless technology</li>
<li><i class="fa fa-cloud"></i> To any Cloud Platform</li>
</ul>
</div>
<div class="span8">
<ul style="list-style-type: none;">
<li><i class="fa fa-share-alt"></i> Connect any sensor</li>
<li><i class="fa fa-rss"></i> Using any wireless technology</li>
<li><i class="fa fa-cloud"></i> To any Cloud Platform</li>
</ul>
</div>
</div>
</div>
</div><!-- /Slide1 -->
</div>
<div class="control-box">
<a data-slide="prev" href="#myCarousel" class="carousel-control left">‹</a>
<a data-slide="next" href="#myCarousel" class="carousel-control right">›</a>
</div><!-- /.control-box -->
</div><!-- /#myCarousel -->
</div><!-- /.span12 -->
</div><!-- /.row -->
</div><!-- /.container -->
</div>
</section>
Here is the sample screenshot:
sample
Here is the FF debug:
sample
edit 1: It is Bootstrap v3.2.0
Here is my relevant custom CSS:
div {
word-break: break-all;
}
img {
max-width: 100%;
}
a {
-webkit-transition: all 150ms ease;
-moz-transition: all 150ms ease;
-ms-transition: all 150ms ease;
-o-transition: all 150ms ease;
transition: all 150ms ease;
}
a:hover {
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
/* IE 8 */
filter: alpha(opacity=50);
/* IE7 */
opacity: 0.6;
text-decoration: none;
}
/* Container */
.container-fluid {
background: #fbf4e0;
margin: 40px auto 10px;
padding: 20px 0px;
max-width: 960px;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}
/* Page Header */
.page-header {
background: #fbf4e0;
margin: -30px 0px 0px;
padding: 20px 40px;
border-top: 4px solid #ccc;
color: #a83b3b;
text-transform: uppercase;
}
.page-header h3 {
line-height: 0.88rem;
color: #a83b3b;
}
/* Thumbnail Box */
.caption {
height: 140px;
width: 100%;
margin: 10px 0px;
padding: 20px;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.caption .span4,
.caption .span8 {
padding: 0px 20px;
}
.caption .span4 {
border-right: 1px dotted #CCCCCC;
}
.caption h3 {
color: #a83b3b;
line-height: 2rem;
margin: 0 0 20px;
text-transform: uppercase;
}
.caption p {
font-size: 1rem;
line-height: 1.6rem;
color: #a83b3b;
}
.caption ul{
color: #a83b3b;
}
.btn.btn-mini {
background: #a83b3b;
border-radius: 0 0 0 0;
color: #fbf4e0;
font-size: 0.63rem;
text-shadow: none !important;
}
.carousel-control {
top: 33%;
}
/* Footer */
.footer {
margin: auto;
width: 100%;
max-width: 960px;
display: block;
font-size: 0.69rem;
}
.footer,
.footer a {
color: #fff;
}
p.right {
float: right;
}
::selection {
background: #ff5e99;
color: #FFFFFF;
text-shadow: 0;
}
::-moz-selection {
background: #ff5e99;
color: #FFFFFF;
}
a,
a:focus,
a:active,
a:hover,
object,
embed {
outline: none;
}
:-moz-any-link:focus {
outline: none;
}
input::-moz-focus-inner {
border: 0;
}
.bannerImage img {
margin-left: 10%;
/*margin-right: 10%;*/
}
edit 2: Here is the other CSS files.
<!-- ==============================================
CSS
=============================================== -->
<link href='http://fonts.googleapis.com/css?family=Raleway:700,400,500' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
Thanks in advance & Best Regards.
So the classes you are using for scaffolding (row-fluid and span*) are from an older version of bootstrap.
You need to use the scaffolding classes of Bootstrap 3 for example: container-fluid, row, col-md-*. Check the full documentation on the Bootstrap 3 grid system here.
Example:
Instead of:
<div class="container-fluid">
<div class="row-fluid">
<div class="span12"></div>
</div>
<div class="row-fluid">
<div class="span8"></div>
<div class="span4"></div>
</div>
</div>
Use:
<div class="container-fluid">
<div class="row">
<div class="col-md-12"></div>
</div>
<div class="row">
<div class="col-md-8"></div>
<div class="col-md-4"></div>
</div>
</div>