Create footer in html for bottom of document not body - html

I'm working on site that have header , content and footer just like other sites , my Problem is when creating the footer it's not stick in document bottom and stick at the bottom of body in html , Here the picture show what I mean :
if I use fixed position for footer in css the result show me like this:
but the main problem is , if Added footer after last div in body I get white space after it , and if use position fix , the footer show in bottom 0 , for better understanding I have one more picture :
as you see in this picture footer fixed in bottom of user view not document , so that all I need is get footer attached to end of document after all contents no body or user view.
/*End FontFamily*/
/*===========================================================================*/
/*General style*/
body{
font-family: Vazirmatn;
}
.shadow{
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}
.cardbox{
background-color: white;
margin-bottom: 16px;
}
hr{
color: lightgray;
}
a{
text-decoration: none;
}
.pull-right {
float: right;
}
.pull-left {
float: left;
}
.green{
color: green;
}
.red{
color: red;
}
.gray{
color: darkgray;
}
.darkgreen{
color: darkgreen;
}
/*end General Style*/
/*===========================================================================*/
/*breadcrumb*/
/* Style the list */
ul.breadcrumb {
padding: 8px 16px;
list-style: none;
height: 24px;
width: 100%;
font-family: Vazirmatn;
}
/* Display list items side by side */
ul.breadcrumb li {
display: inline;
font-size: 10px;
}
/* Add a slash symbol (/) before/behind each list item */
ul.breadcrumb li+li:before {
padding: 8px;
color: lightgray;
content: "/\00a0";
}
/* Add a color to all links inside the list */
ul.breadcrumb li a {
color: lightgray;
text-decoration: none;
}
/* Add a color on mouse-over */
ul.breadcrumb li a:hover {
color: #01447e;
text-decoration: underline;
}
/*End breadcrumb*/
/*===========================================================================*/
/*side blocks*/
/*--- Sidebar ---*/
.sidebarblock {
background-color: #ffffff;
border-radius: 2px;
box-shadow: 0 1px 2px #c9cccd;
margin-bottom: 20px;
}
.sidebarblock h3 {
color: #363838;
font-size: 16px;
margin: 0;
padding: 20px;
font-weight: 600;
}
.sidebarblock .divline {
height: 1px;
line-height: 1px;
border-bottom: solid 1px #f1f1f1;
}
.sidebarblock .blocktxt {
padding:20px;
}
.sidebarblock .blocktxtlight{
font-size: 12px;
padding:4px 20px 4px 20px;
}
ul.cats li {
list-style: none;
display: block;
margin:0;
padding:0;
line-height: 30px;
}
ul.cats {
margin: 0;
padding: 0;
}
ul.cats li a {
font-size: 14px;
color: #363838;
line-height: 30px;
}
ul.cats .badge {
background-color: #bdc3c7;
font-size: 12px;
color: #ffffff;
margin-top: 7px;
}
.sidebarblock .blocktxt {
font-size: 14px;
color: #363838;
}
.sidebarblock .blocktxt .smal {
font-size: 12px;
}
.chbox {
width: 50px;
}
table.poll {
width: 100%;
}
.progress-bar.color1 {
background-color: #9b59b6;
}
.progress-bar.color2 {
background-color: #3498db;
}
.progress-bar.color3 {
background-color: #e67e22;
}
.progress-bar {
font-size: 14px;
color: #ffffff;
line-height: 31px;
text-align: left;
padding-left: 10px;
box-shadow: none;
}
.progress {
background-color: #ecf0f1;
height: 31px;
border-radius: 2px;
box-shadow: none;
}
.poll label {
margin-bottom: 0;
margin-left: 20px;
}
.poll input[type="radio"] {
display:none;
}
.poll input[type="radio"] + label {
display:inline-block;
width:31px;
height:31px;
background: url(radio.jpg) 0 0 no-repeat;
vertical-align:middle;
cursor:pointer;
}
.poll input[type="radio"]:checked + label {
background: url(radio.jpg) -31px 0 no-repeat;
}
td.chbox {
vertical-align: top;
}
/*end side blocks*/
/*===========================================================================*/
/*Tickets review*/
.beforepagination {
margin-bottom: 0;
}
.ticket {
background-color: #ffffff;
border-radius: 2px;
box-shadow: 0 1px 2px #c9cccd;
margin-bottom: 20px;
padding: 8px
}
.ticket .userinfo {
padding: 15px 0 15px 0;
}
.ticket .avatar {
margin-right: 5px;
}
.ticket .co-ownership {
width: 100%;
border-top: solid 1px #f1f1f1;
margin-top: 12px;
padding-top: 7px;
margin: auto;
text-align: center;
}
.ticket .posttext {
text-align: justify;
text-justify: inter-word;
padding-right: 8px;
font-size: 14px;
margin-left: 8px;
}
.ticket h2 {
color: #363838;
font-size: 18px;
margin-top: 10px;
margin-bottom: 10px;
}
.ticket .comments {
padding: 18px 0 25px 0;
text-align: center;
}
.ticket .comments .commentbg {
background-color: #bdc3c7;
border-radius: 2px;
display: inline-block;
padding: 6px 8px;
color: #ffffff;
font-size: 10px;
position: relative;
}
.ticket .comments .commentbg .mark {
width: 10%;
height: 11px;
background-color: #bdc3c7;
position: absolute;
bottom: 0;
left: 36%;
margin-bottom: -5px;
transform:rotate(45deg);
-ms-transform:rotate(45deg); /* IE 9 */
-webkit-transform:rotate(45deg); /* Opera, Chrome, and Safari */
}
.ticket .views {
color:#9da6aa;
font-size: 10px;
text-align: center;
line-height: 29px;
}
.ticket .views i {
font-size: 10px;
}
.ticket .time {
color:#9da6aa;
font-size: 12px;
text-align: center;
line-height: 29px;
}
.ticket .time i {
font-size: 14px;
}
.ticket .ticketinfo {
border-right: solid 1px #f1f1f1;
}
.avatar {
position: relative;
}
.avatar img {
border-radius: 50%;
border: 0;
vertical-align: middle;
}
.avatar .online {
background-color: green;
}
.avatar .offline {
background-color: lightgray;
}
.avatar .status {
position: absolute;
left: 0;
bottom: 0;
width: 12px;
height: 12px;
line-height: 12px;
border-radius: 50%;
border: solid 2px #ffffff;
}
.postinfobot {
border-top: solid 1px #f1f1f1;
line-height: 32px;
padding: 0 0 0 0;
}
.postinfobot .information {
margin-left: 18px;
font-size: 9px;
color: #bdc3c7;
}
.postinfobot .information i {
font-size: 12px;
color: #bdc3c7;
padding-right: 8px;
}
.toTheTicket {
display: flex;
height: 100%;
align-items: center;
margin: 0;
padding: 0;
}
.toTheTicket i {
line-height: normal;
display: inline-block;
vertical-align: middle;
padding-left: 16px;
}
.tagsintickets{
padding: 8px 20px 8px 20px;
}
/*End Tickets review*/
/*===========================================================================*/
/*--- Pagination ---*/
.pagination {
display: inline-block;
font-size: 9px;
padding: 8px 0 0 0;
}
.pagination a {
color: black;
float: left;
padding: 4px 8px;
text-decoration: none;
}
.pagination a.active {
background-color: lightblue;
color: white;
border-radius: 5px;
}
.pagination a:hover:not(.active) {
background-color: #ddd;
border-radius: 5px;
}
/*--- End Pagination ---*/
/*===========================================================================*/
/*Menu*/
.main_menu{
width: 100%;
height: 48px;
background-color: white;
margin-bottom: 8px;
}
.searchbox{
height: 32px;
}
.main_menu .wrap{
margin-top: 8px;
height: 32px;
margin-right: 8px;
width: 100%;
}
.main_menu .wrap input{
width: 40vw;
}
#media only screen and (max-width: 995px) {
.main_menu .wrap input{
width: 20vw;
}
}
#media only screen and (max-width: 765px) {
.main_menu .wrap input{
width: 45vw;
}
}
#media only screen and (max-width: 575px) {
.main_menu .wrap input{
width: 65vw;
}
}
.avt {
height: 48px;
}
.avt button {
margin-top: 8px;
height: 32px;
border: none;
box-shadow: none;
color: #ffffff;
font-size: 12px;
padding-left: 16px;
padding-right: 16px;
background-color: #1abc9c;
}
.avt .btn-primary:hover,
.avt .btn-primary:focus,
.avt .btn-primary:active,
.avt .btn-primary.active{
background-color: #1abc9c;
border: none;
box-shadow: none;
}
.env {
height: 32px;
margin-top: 8px;
font-size: 18px;
color:#cfd5d7;
line-height: 38px;
padding: 0 20px;
}
.main_menu .avatar {
margin-top: 8px;
margin-left: 8px;
}
.main_menu .avatar img {
border-radius: 50%;
}
.dropdown.avatar .status {
right: 14px;
}
/*End Menu*/
/*===========================================================================*/
/*header description*/
.headerDescription{
padding: 20px;
}
.headerDescription h4{
font-weight: 500;
}
.headerDescription p {
text-align: justify;
text-justify: inter-word;
font-size: 14px;
}
/*End header description*/
/*===========================================================================*/
/*footer*/
.footer{
width: 100%;
padding: 20px;
}
/*end footer*/
<!DOCTYPE html>
<html dir="rtl">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>دمو نظام حل مسئله</title>
<script type="text/javascript" src="plugins/jquery/jquery-3.6.3.min.js"></script>
<script type="text/javascript" src="plugins/bootstrap/bootstrap.bundle.min.js"></script>
<link rel="stylesheet" href="plugins/bootstrap/bootstrap.rtl.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap#5.2.3/dist/css/bootstrap.min.css" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<link rel="stylesheet" href="mian.css">
<link rel="stylesheet" href="plugins/fontawesome/css/all.min.css">
<link rel="apple-touch-icon" sizes="57x57" href="/favicon/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/favicon/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/favicon/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/favicon/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/favicon/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/favicon/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/favicon/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/favicon/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="/favicon/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/favicon/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png">
<link rel="manifest" href="/favicon/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/favicon/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
</head>
<body style="background-color: aliceblue">
<!--main body-->
<!--menu-->
<div class="main_menu shadow">
<div class="container">
<div class="row">
<div class="d-none d-xs-none d-sm-none d-md-block col-1 logo d-flex justify-content-center"><img src="favicon/android-icon-48x48.png" alt=""></div>
<div class="d-none d-sm-none d-md-block col-sm-3 col-lg-2 avt d-flex justify-content-center">
<div class="stnt pull-left">
<form action="03_new_topic.html" method="post" class="form">
<button class="btn btn-primary">طرح پرسش جدید</button>
</form>
</div>
<div class="clearfix"></div>
</div>
<div class="col-sm-auto col-lg-9 col-xs-12 d-flex justify-content-center">
<div class="avatar pull-right dropdown">
<a data-toggle="dropdown" href="#"><img src="avatar2.jpg" height="32" width="32" ></a>
<ul class="dropdown-menu" role="menu">
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">My Profile</a></li>
<li role="presentation"><a role="menuitem" tabindex="-2" href="#">Inbox</a></li>
<li role="presentation"><a role="menuitem" tabindex="-3" href="#">Log Out</a></li>
<li role="presentation"><a role="menuitem" tabindex="-4" href="04_new_account.html">Create account</a></li>
</ul>
</div>
<div class="wrap">
<form action="#" method="post" class="form">
<div class="pull-right txt">
<input type="text" class="searchbox form-control" placeholder="[جستجو...]">
</div>
<div class="pull-right">
<button class="btn btn-default" type="button"><i class="fa fa-search"></i></button>
</div>
<div class="clearfix"></div>
</form>
</div>
<div class="env pull-left d-none d-sm-block"><i class="gray fa-solid fa-bell"></i></div>
</div>
</div>
</div>
</div>
<!--end menu -->
<div class="container">
<!-- breadcrumb-->
<div class="row">
<ul class="breadcrumb">
<li>نظام حل مسئله</li>
<li>مسائل مطرح شده</li>
<li>خدمات مشترکین</li>
</ul>
</div>
<!-- end breadcrumb-->
<!-- main content row-->
<div class="row">
<div class="col-sm-12 col-md-8">
<div class="headerDescription cardbox shadow">
<h5>سوالات برچسب شده [خدمات مشترکین]</h5>
<p>این ستاد وظیفه دارد که جهت پاسخگویی صحیح و رضایت حال مشترکین محترم با ادارات تابعه خود هماهنگ شده و درخواست‌ها و پیشنهاداتی که به خدمات مشترکین در ستاد ارجاع میگردد براساس مقررات و آئین نامه تکمیلی تعرفه‌های برق آنرا تا حصول نتیجه پیگیری نماید کارهایی که در این ستاد انجام میشود بصورت خلاصه بشرح ذیل میباشد:</p>
<p>۱ - رسیدگی به شکوائیه جهت اشتراکهای عادی و دیماند<br />
۲ - بررسی تعدیلات در بخش عادی و دیماند<br />
۳ - نظارت بر فروش انشعابات عادی ودیماند در شهرستانهای تابعه شرکت<br />
۴ - بازرسی موردی و اتفاقی از ادارات مشترکین در شهرستانهای تابعه شرکت<br />
<hr>
<div class="filter">
<div class="btn-group" role="group" aria-label="Button group with nested dropdown">
<button type="button" class="btn"><span class="fa-solid fa-eye fa-lg" aria-hidden="true"></span>
دنبال کردن</button>
<button type="button" class="btn"><span class="fa-regular fa-clock fa-lg" aria-hidden="true"></span>
تازه ها</button>
<button type="button" class="btn"><span class="fa-solid fa-chart-line fa-lg" aria-hidden="true"></span>
فعال ترین</button>
</div>
</div>
</div>
<div class="ticket beforepagination shadow cardbox">
<div class="topwrap">
<div class="row">
<div class="col-md-1 col-sm-2 d-flex justify-content-center">
<div class="userinfo pull-right">
<div class="avatar">
<img src="avatar4.jpg" alt="">
<div class="status offline"> </div>
</div>
<div class="co-ownership">
<i class="fa-regular fa-circle-check gray"></i>
<i class="fa-solid fa-lock green"></i>
</div>
</div>
</div>
<div class="col-md-10 col-sm-8">
<div class="posttext pull-right">
<h2>جا به جایی واحد مالی (بسته شده)</h2>
<p>از لحاظ استقرار موقعیت واحد مالی اصلاً جالب نیست و فکر می کنم باید در جای دیگه ای مستقر بشوند ، بنظرم به قسمت ساختمان شماره 5 بروند بهتر است.یا شاید هم در جای دیگری</p>
</div>
</div>
<div class="col-md-1 col-sm-2 p-0 pb-2 d-flex justify-content-center">
<div class="toTheTicket"><i class="fa-regular fa-eye-slash fa-2x gray"></i></div>
</div>
</div>
<div class="tagsintickets">
<span class="badge bg-light text-dark">صنعت برق</span>
<span class="badge bg-light text-dark">ساختارسازمانی</span>
<span class="badge bg-light text-dark">واحدسازمانی</span>
<span class="badge bg-light text-dark">ساختمان</span>
<span class="badge bg-light text-dark">مالی</span>
</div>
<div class="clearfix"></div>
</div>
<div class="postinfobot">
<div class="information pull-right"><i class="fa-regular fa-clock"> </i> 10 آبان ماه 1401 ساعت 12:10</div>
<div class="information pull-right"><i class="fa-regular fa-user"> </i>شهرام ارمنی</div>
<div class="information pull-right"><i class="fa-solid fa-sitemap"> </i>معاونت مالی</div>
<div class="clearfix"></div>
</div>
</div>
<div class="col-lg-12 col-xs-12 col-md-12 pb-2 d-flex justify-content-center cardbox shadow">
<div class="pagination">
»
1
2
۳
...
978
979
«
</div>
</div>
</div>
<div class="col-sm-12 col-md-4">
<div class="sidebarblock shadow cardbox">
<h3>دسته بندی ها</h3>
<div class="divline"></div>
<div class="blocktxt">
<ul class="cats">
<li>خدمات مشترکین<span class="badge pull-left">20</span></li>
<li>قبوض برق<span class="badge pull-left">10</span></li>
<li>رفع حریم شبکه توزیع<span class="badge pull-left">50</span></li>
<li>برآورد هزینه انشعاب<span class="badge pull-left">36</span></li>
<li>سیستم جامع مالی(طلای شرق)<span class="badge pull-left">41</span></li>
<li>سیستم جامع مشترکین<span class="badge pull-left">11</span></li>
<li>سامانه فنی و مهندسی(سنم)<span class="badge pull-left">5</span></li>
</ul>
</div>
</div>
</div>
<!-- main content row-->
</div>
<!--end main body-->
<script>
function walkNode(node) {
if (node.nodeType == 3) {
node.data = node.data.replace(/\d/g,convert);
}
for (var i = 0; i < node.childNodes.length; i++) {
walkNode(node.childNodes[i]);
}
}
walkNode(document.getElementsByTagName('body')[0]);
function convert(a){
return ['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹'][a];
}
</script>
</body>
<footer>
<div class="footer cardbox shadow">
The Footer is Here!
</div>
</footer>
</html>

Is this what you want ?
I am using css grid for this. Check the css at the start of the document.
To learn how it works : https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout
body {
font-family: Vazirmatn;
min-height: 100vh;
display: grid;
grid-template-rows: auto 1fr auto;
}
.main_menu {
grid-row: 1;
}
.main_content {
grid-row: 2;
}
.footer {
grid-row: 3;
}
/*End FontFamily*/
/*===========================================================================*/
/*General style*/
.shadow {
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}
.cardbox {
background-color: white;
margin-bottom: 16px;
}
hr {
color: lightgray;
}
a {
text-decoration: none;
}
.pull-right {
float: right;
}
.pull-left {
float: left;
}
.green {
color: green;
}
.red {
color: red;
}
.gray {
color: darkgray;
}
.darkgreen {
color: darkgreen;
}
/*end General Style*/
/*===========================================================================*/
/*breadcrumb*/
/* Style the list */
ul.breadcrumb {
padding: 8px 16px;
list-style: none;
height: 24px;
width: 100%;
font-family: Vazirmatn;
}
/* Display list items side by side */
ul.breadcrumb li {
display: inline;
font-size: 10px;
}
/* Add a slash symbol (/) before/behind each list item */
ul.breadcrumb li+li:before {
padding: 8px;
color: lightgray;
content: "/\00a0";
}
/* Add a color to all links inside the list */
ul.breadcrumb li a {
color: lightgray;
text-decoration: none;
}
/* Add a color on mouse-over */
ul.breadcrumb li a:hover {
color: #01447e;
text-decoration: underline;
}
/*End breadcrumb*/
/*===========================================================================*/
/*side blocks*/
/*--- Sidebar ---*/
.sidebarblock {
background-color: #ffffff;
border-radius: 2px;
box-shadow: 0 1px 2px #c9cccd;
margin-bottom: 20px;
}
.sidebarblock h3 {
color: #363838;
font-size: 16px;
margin: 0;
padding: 20px;
font-weight: 600;
}
.sidebarblock .divline {
height: 1px;
line-height: 1px;
border-bottom: solid 1px #f1f1f1;
}
.sidebarblock .blocktxt {
padding: 20px;
}
.sidebarblock .blocktxtlight {
font-size: 12px;
padding: 4px 20px 4px 20px;
}
ul.cats li {
list-style: none;
display: block;
margin: 0;
padding: 0;
line-height: 30px;
}
ul.cats {
margin: 0;
padding: 0;
}
ul.cats li a {
font-size: 14px;
color: #363838;
line-height: 30px;
}
ul.cats .badge {
background-color: #bdc3c7;
font-size: 12px;
color: #ffffff;
margin-top: 7px;
}
.sidebarblock .blocktxt {
font-size: 14px;
color: #363838;
}
.sidebarblock .blocktxt .smal {
font-size: 12px;
}
.chbox {
width: 50px;
}
table.poll {
width: 100%;
}
.progress-bar.color1 {
background-color: #9b59b6;
}
.progress-bar.color2 {
background-color: #3498db;
}
.progress-bar.color3 {
background-color: #e67e22;
}
.progress-bar {
font-size: 14px;
color: #ffffff;
line-height: 31px;
text-align: left;
padding-left: 10px;
box-shadow: none;
}
.progress {
background-color: #ecf0f1;
height: 31px;
border-radius: 2px;
box-shadow: none;
}
.poll label {
margin-bottom: 0;
margin-left: 20px;
}
.poll input[type="radio"] {
display: none;
}
.poll input[type="radio"]+label {
display: inline-block;
width: 31px;
height: 31px;
background: url(radio.jpg) 0 0 no-repeat;
vertical-align: middle;
cursor: pointer;
}
.poll input[type="radio"]:checked+label {
background: url(radio.jpg) -31px 0 no-repeat;
}
td.chbox {
vertical-align: top;
}
/*end side blocks*/
/*===========================================================================*/
/*Tickets review*/
.beforepagination {
margin-bottom: 0;
}
.ticket {
background-color: #ffffff;
border-radius: 2px;
box-shadow: 0 1px 2px #c9cccd;
margin-bottom: 20px;
padding: 8px
}
.ticket .userinfo {
padding: 15px 0 15px 0;
}
.ticket .avatar {
margin-right: 5px;
}
.ticket .co-ownership {
width: 100%;
border-top: solid 1px #f1f1f1;
margin-top: 12px;
padding-top: 7px;
margin: auto;
text-align: center;
}
.ticket .posttext {
text-align: justify;
text-justify: inter-word;
padding-right: 8px;
font-size: 14px;
margin-left: 8px;
}
.ticket h2 {
color: #363838;
font-size: 18px;
margin-top: 10px;
margin-bottom: 10px;
}
.ticket .comments {
padding: 18px 0 25px 0;
text-align: center;
}
.ticket .comments .commentbg {
background-color: #bdc3c7;
border-radius: 2px;
display: inline-block;
padding: 6px 8px;
color: #ffffff;
font-size: 10px;
position: relative;
}
.ticket .comments .commentbg .mark {
width: 10%;
height: 11px;
background-color: #bdc3c7;
position: absolute;
bottom: 0;
left: 36%;
margin-bottom: -5px;
transform: rotate(45deg);
-ms-transform: rotate(45deg);
/* IE 9 */
-webkit-transform: rotate(45deg);
/* Opera, Chrome, and Safari */
}
.ticket .views {
color: #9da6aa;
font-size: 10px;
text-align: center;
line-height: 29px;
}
.ticket .views i {
font-size: 10px;
}
.ticket .time {
color: #9da6aa;
font-size: 12px;
text-align: center;
line-height: 29px;
}
.ticket .time i {
font-size: 14px;
}
.ticket .ticketinfo {
border-right: solid 1px #f1f1f1;
}
.avatar {
position: relative;
}
.avatar img {
border-radius: 50%;
border: 0;
vertical-align: middle;
}
.avatar .online {
background-color: green;
}
.avatar .offline {
background-color: lightgray;
}
.avatar .status {
position: absolute;
left: 0;
bottom: 0;
width: 12px;
height: 12px;
line-height: 12px;
border-radius: 50%;
border: solid 2px #ffffff;
}
.postinfobot {
border-top: solid 1px #f1f1f1;
line-height: 32px;
padding: 0 0 0 0;
}
.postinfobot .information {
margin-left: 18px;
font-size: 9px;
color: #bdc3c7;
}
.postinfobot .information i {
font-size: 12px;
color: #bdc3c7;
padding-right: 8px;
}
.toTheTicket {
display: flex;
height: 100%;
align-items: center;
margin: 0;
padding: 0;
}
.toTheTicket i {
line-height: normal;
display: inline-block;
vertical-align: middle;
padding-left: 16px;
}
.tagsintickets {
padding: 8px 20px 8px 20px;
}
/*End Tickets review*/
/*===========================================================================*/
/*--- Pagination ---*/
.pagination {
display: inline-block;
font-size: 9px;
padding: 8px 0 0 0;
}
.pagination a {
color: black;
float: left;
padding: 4px 8px;
text-decoration: none;
}
.pagination a.active {
background-color: lightblue;
color: white;
border-radius: 5px;
}
.pagination a:hover:not(.active) {
background-color: #ddd;
border-radius: 5px;
}
/*--- End Pagination ---*/
/*===========================================================================*/
/*Menu*/
.main_menu {
width: 100%;
height: 48px;
background-color: white;
margin-bottom: 8px;
}
.searchbox {
height: 32px;
}
.main_menu .wrap {
margin-top: 8px;
height: 32px;
margin-right: 8px;
width: 100%;
}
.main_menu .wrap input {
width: 40vw;
}
#media only screen and (max-width: 995px) {
.main_menu .wrap input {
width: 20vw;
}
}
#media only screen and (max-width: 765px) {
.main_menu .wrap input {
width: 45vw;
}
}
#media only screen and (max-width: 575px) {
.main_menu .wrap input {
width: 65vw;
}
}
.avt {
height: 48px;
}
.avt button {
margin-top: 8px;
height: 32px;
border: none;
box-shadow: none;
color: #ffffff;
font-size: 12px;
padding-left: 16px;
padding-right: 16px;
background-color: #1abc9c;
}
.avt .btn-primary:hover,
.avt .btn-primary:focus,
.avt .btn-primary:active,
.avt .btn-primary.active {
background-color: #1abc9c;
border: none;
box-shadow: none;
}
.env {
height: 32px;
margin-top: 8px;
font-size: 18px;
color: #cfd5d7;
line-height: 38px;
padding: 0 20px;
}
.main_menu .avatar {
margin-top: 8px;
margin-left: 8px;
}
.main_menu .avatar img {
border-radius: 50%;
}
.dropdown.avatar .status {
right: 14px;
}
/*End Menu*/
/*===========================================================================*/
/*header description*/
.headerDescription {
padding: 20px;
}
.headerDescription h4 {
font-weight: 500;
}
.headerDescription p {
text-align: justify;
text-justify: inter-word;
font-size: 14px;
}
/*End header description*/
/*===========================================================================*/
/*footer*/
.footer {
width: 100%;
padding: 20px;
}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap#5.2.3/dist/css/bootstrap.min.css" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<!--main body-->
<!--menu-->
<div class="main_menu shadow">
<div class="container">
<div class="row">
<div class="d-none d-xs-none d-sm-none d-md-block col-1 logo d-flex justify-content-center">
<img src="favicon/android-icon-48x48.png" alt="">
</div>
<div class="d-none d-sm-none d-md-block col-sm-3 col-lg-2 avt d-flex justify-content-center">
<div class="stnt pull-left">
<form action="03_new_topic.html" method="post" class="form">
<button class="btn btn-primary">طرح پرسش جدید</button>
</form>
</div>
<div class="clearfix"></div>
</div>
<div class="col-sm-auto col-lg-9 col-xs-12 d-flex justify-content-center">
<div class="avatar pull-right dropdown">
<a data-toggle="dropdown" href="#"><img src="avatar2.jpg" height="32" width="32"></a>
<ul class="dropdown-menu" role="menu">
<li role="presentation"><a role="menuitem" tabindex="-1" href="#">My Profile</a></li>
<li role="presentation"><a role="menuitem" tabindex="-2" href="#">Inbox</a></li>
<li role="presentation"><a role="menuitem" tabindex="-3" href="#">Log Out</a></li>
<li role="presentation"><a role="menuitem" tabindex="-4" href="04_new_account.html">Create account</a></li>
</ul>
</div>
<div class="wrap">
<form action="#" method="post" class="form">
<div class="pull-right txt">
<input type="text" class="searchbox form-control" placeholder="[جستجو...]">
</div>
<div class="pull-right">
<button class="btn btn-default" type="button"><i class="fa fa-search"></i></button>
</div>
<div class="clearfix"></div>
</form>
</div>
<div class="env pull-left d-none d-sm-block"><i class="gray fa-solid fa-bell"></i></div>
</div>
</div>
</div>
</div>
<!--end menu -->
<div class="container main_content">
<!-- breadcrumb-->
<div class="row">
<ul class="breadcrumb">
<li>نظام حل مسئله</li>
<li>مسائل مطرح شده</li>
<li>خدمات مشترکین</li>
</ul>
</div>
<!-- end breadcrumb-->
<!-- main content row-->
<div class="row">
<div class="col-sm-12 col-md-8">
<div class="headerDescription cardbox shadow">
<h5>سوالات برچسب شده [خدمات مشترکین]</h5>
<p>این ستاد وظیفه دارد که جهت پاسخگویی صحیح و رضایت حال مشترکین محترم با ادارات تابعه خود هماهنگ شده و درخواست‌ها و پیشنهاداتی که به خدمات مشترکین در ستاد ارجاع میگردد براساس مقررات و آئین نامه تکمیلی تعرفه‌های برق آنرا تا حصول نتیجه پیگیری نماید
کارهایی که در این ستاد انجام میشود بصورت خلاصه بشرح ذیل میباشد:</p>
<p>۱ - رسیدگی به شکوائیه جهت اشتراکهای عادی و دیماند<br /> ۲ - بررسی تعدیلات در بخش عادی و دیماند<br /> ۳ - نظارت بر فروش انشعابات عادی ودیماند در شهرستانهای تابعه شرکت<br /> ۴ - بازرسی موردی و اتفاقی از ادارات مشترکین در شهرستانهای تابعه شرکت<br
/>
<hr>
<div class="filter">
<div class="btn-group" role="group" aria-label="Button group with nested dropdown">
<button type="button" class="btn"><span class="fa-solid fa-eye fa-lg" aria-hidden="true"></span>
دنبال کردن</button>
<button type="button" class="btn"><span class="fa-regular fa-clock fa-lg" aria-hidden="true"></span>
تازه ها</button>
<button type="button" class="btn"><span class="fa-solid fa-chart-line fa-lg" aria-hidden="true"></span>
فعال ترین</button>
</div>
</div>
</div>
<div class="ticket beforepagination shadow cardbox">
<div class="topwrap">
<div class="row">
<div class="col-md-1 col-sm-2 d-flex justify-content-center">
<div class="userinfo pull-right">
<div class="avatar">
<img src="avatar4.jpg" alt="">
<div class="status offline"> </div>
</div>
<div class="co-ownership">
<i class="fa-regular fa-circle-check gray"></i>
<i class="fa-solid fa-lock green"></i>
</div>
</div>
</div>
<div class="col-md-10 col-sm-8">
<div class="posttext pull-right">
<h2>جا به جایی واحد مالی (بسته شده)</h2>
<p>از لحاظ استقرار موقعیت واحد مالی اصلاً جالب نیست و فکر می کنم باید در جای دیگه ای مستقر بشوند ، بنظرم به قسمت ساختمان شماره 5 بروند بهتر است.یا شاید هم در جای دیگری</p>
</div>
</div>
<div class="col-md-1 col-sm-2 p-0 pb-2 d-flex justify-content-center">
<div class="toTheTicket"><i class="fa-regular fa-eye-slash fa-2x gray"></i></div>
</div>
</div>
<div class="tagsintickets">
<span class="badge bg-light text-dark">صنعت برق</span>
<span class="badge bg-light text-dark">ساختارسازمانی</span>
<span class="badge bg-light text-dark">واحدسازمانی</span>
<span class="badge bg-light text-dark">ساختمان</span>
<span class="badge bg-light text-dark">مالی</span>
</div>
<div class="clearfix"></div>
</div>
<div class="postinfobot">
<div class="information pull-right"><i class="fa-regular fa-clock"> </i> 10 آبان ماه 1401 ساعت 12:10</div>
<div class="information pull-right"><i class="fa-regular fa-user"> </i>شهرام ارمنی</div>
<div class="information pull-right"><i class="fa-solid fa-sitemap"> </i>معاونت مالی</div>
<div class="clearfix"></div>
</div>
</div>
<div class="col-lg-12 col-xs-12 col-md-12 pb-2 d-flex justify-content-center cardbox shadow">
<div class="pagination">
»
1
2
۳
...
978
979
«
</div>
</div>
</div>
<div class="col-sm-12 col-md-4">
<div class="sidebarblock shadow cardbox">
<h3>دسته بندی ها</h3>
<div class="divline"></div>
<div class="blocktxt">
<ul class="cats">
<li>خدمات مشترکین<span class="badge pull-left">20</span></li>
<li>قبوض برق<span class="badge pull-left">10</span></li>
<li>رفع حریم شبکه توزیع<span class="badge pull-left">50</span></li>
<li>برآورد هزینه انشعاب<span class="badge pull-left">36</span></li>
<li>سیستم جامع مالی(طلای شرق)<span class="badge pull-left">41</span></li>
<li>سیستم جامع مشترکین<span class="badge pull-left">11</span></li>
<li>سامانه فنی و مهندسی(سنم)<span class="badge pull-left">5</span></li>
</ul>
</div>
</div>
</div>
<!-- main content row-->
</div>
</div>
<!--end main body-->
<footer>
<div class="footer cardbox m-0 text-center shadow">
The Footer is Here!
</div>
</footer>

Related

Twitter clone - how to stop my sidebar from moving down when I add other content

I am creating a Twitter clone but the sidebar moves down when I create the main page contents. I tried using Position - fixed and relative but still the same issue. Before I added the main page content, the sidebar was correctly positioned (please see screenshot) but as soon as its added, the sidebar moves down(please see screenshot).
I'm using Grid to create the three columns to give the Twitter aesthetics.
What am I doing wrong?
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.twitter-logo {
height: 28px;
filter: invert(52%) sepia(50%) saturate(2964%) hue-rotate(179deg) brightness(95%) contrast(97%);
margin-left: 25px;
}
.left-sidebar {
/* position: fixed; */
position: relative;
}
.navbar-brand:hover {
background: rgba(29, 161, 242, 0.1);
border-radius: 50%;
color: #1da0f2;
margin-right: 23px;
/* padding: 20px; */
}
.left-sidebar-menu {
font-size: 20px;
cursor: pointer;
font-weight: 700;
display: flex;
color: rgb(15, 20, 25);
font-family: 'Times New Roman', Times, serif;
}
.left-sidebar-menu-icon {
align-items: flex-start;
height: 26px;
margin-right: 20px;
}
.nav-item {
padding: 10px;
margin: 2px 2px;
}
.nav-item:hover {
background: rgba(29, 161, 242, 0.1);
border-radius: 20px;
color: #1da0f2;
}
/* --------------------------------MAIN PAGE------ */
.main-page-header {
font-size: 18px;
height: 48px;
font-weight: 700;
font-family: 'Open Sans', sans-serif;
}
.main-page-header-profile-picture {
border-radius: 50%;
height: 48px;
}
.main-page-input {
border: 0 solid black;
}
.main-page-input-box {
padding-top: 10px;
border-bottom: 1px solid #e6e6e6;
}
.main-page-tweet-box {
margin-top: -5px;
word-wrap: break-word;
word-break: break-all;
outline: none;
}
.main-page-tweet-box:focus main-page-tweet-box:hover {
outline: none !important;
box-shadow: none;
border: 0;
}
.main-page-tweet-box {
height: 130px;
border: 0;
margin-top: -10px;
}
::placeholder {
font-family: 'Open Sans', sans-serif;
opacity: 1;
font-size: 18px;
/* position: absolute;
margin-top: 10px; */
}
.main-page-input-privacy {
/* display: flex;
align-items: flex-start; */
display: inline-block;
color: #1da1f2;
cursor: pointer;
}
.main-page-input-privacy-icon,
main-page-input-privacy-text {
display: inline;
}
/* .main-page-input-privacy i{
float: left;
} */
.main-page-input-icons {
display: flex;
justify-content: space-between;
margin-left: -35PX;
}
.main-page-input-icons-ul {
list-style-type: none;
margin-left: 5px;
}
.main-page-input-icons li {
display: inline;
/* width: 300px; */
list-style: none;
color: #1da1f2;
font-size: 20px;
margin: 0 2px;
height: 38px;
width: 38px;
cursor: pointer;
}
.main-page-tweet-button {
font-size: 16px;
font-family: 'Open Sans', sans-serif;
color: white;
background-color: #1da1f2;
text-align: center;
cursor: pointer;
/* width: 75px; */
/* height: 30px; */
border: none;
outline: none;
opacity: 0.5;
}
/* .main-page-input form {
} */
/* .left-sidebar-menu-icon-active using js {
filter: invert(52%) sepia(50%) saturate(2964%) hue-rotate(179deg) brightness(95%) contrast(97%);
} */
/* .left-sidebar-menu-btn {
} */
.tweetbox__input img {
border-radius: 50%;
height: 40px;
}
.tweetBox {
padding-bottom: 10px;
border-bottom: 8px solid var(--twitter-background);
padding-right: 10px;
}
.tweetBox form {
display: flex;
flex-direction: column;
}
.tweetbox__input {
display: flex;
padding: 20px;
}
.tweetbox__input input {
flex: 1;
margin-left: 20px;
font-size: 20px;
border: none;
outline: none;
}
.tweetBox__tweetButton {
background-color: var(--twitter-color);
border: none;
color: white;
font-weight: 900;
border-radius: 30px;
width: 80px;
height: 40px;
margin-top: 20px;
margin-left: auto;
}
.tweet {
display: flex;
margin-bottom: 4px;
border-bottom: 1px solid rgb(47, 51, 54);
cursor: pointer;
}
.tweet-author-image {
border-radius: 50%;
height: 48px;
width: 48px;
margin-right: 12px;
}
.tweet-feed-content {
margin-bottom: 15px;
padding-bottom: 12px;
}
.tweet-header {
display: flex;
font-size: 15px;
font-weight: 400;
}
.tweet-author-username {
font-family: 'Times New Roman', Times, serif;
/* color: rgb(231, 233, 234); */
}
.tweet-author-handle {
color: rgb(113, 118, 123);
}
.tweeted-time {
color: rgb(113, 118, 123);
}
.engagement-icons-ul {
display: flex;
list-style-type: none;
justify-content: space-between;
margin-left: -30px;
width: 400px;
}
<div class="container">
<div class="row">
<div class="col-3 navbar">
<nav>
<div class="left-sidebar">
<a class="navbar-brand" href="#">
<img src={ % static 'network/images/brand.svg' %} alt="Twitter logo" class="twitter-logo">
</a>
<ul class="nav flex-column left-sidebar-menu mb-4 mt-2">
<li class="nav-item">
<a class="nav-link" href="#">
<img src={ % static 'network/images/all-post.svg' %} alt="All post" class="left-sidebar-menu-icon"> All Post
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<img src={ % static 'network/images/following.svg' %} alt="Following" class="left-sidebar-menu-icon"> Following
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<img src={ % static 'network/images/notifications.svg' %} alt="Notifications" class="left-sidebar-menu-icon"> Notifications
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<img src={ % static 'network/images/messages.svg' %} alt="Messages" class="left-sidebar-menu-icon"> Messages
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<img src={ % static 'network/images/profile.svg' %} alt="Profile" class="left-sidebar-menu-icon"> Profile
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<img src={ % static 'network/images/more.svg' %} alt="More" class="left-sidebar-menu-icon"> More
</a>
</li>
<button class="btn btn-primary rounded-pill my-2 py-3">Tweet</button>
</ul>
</div>
</nav>
</div>
<div class="col-5">
<div class="main-page-header mt-3 sticky-top">Home</div>
<div class="main-page-input">
<!-- <form class="d-flex flex-column"> -->
<div class="row">
<div class="col-2 main-page-header-profile-picture">
<img src="https://i.pinimg.com/originals/a6/58/32/a65832155622ac173337874f02b218fb.png" class="main-page-header-profile-picture" alt="profile-picture" />
</div>
<div class="col-10">
<div class="main-page-input-box">
<div>
<textarea name="tweet-box" id="" class="form-control main-page-tweet-box text-wrap" cols="30" rows="10" placeholder="What's happening"></textarea>
<!-- <input type="text" class="form-control main-page-tweet-box text-wrap" id="exampleFormControlInput1" placeholder="What's happening"> -->
</div>
<div class="main-page-input-privacy pb-2 mt-3">
<i class="fas fa-globe-americas main-page-input-privacy-icon"></i>
<span class="ain-page-input-privacy-text ml-2">Everyone can reply</span>
</div>
</div>
<div class="main-page-input-icons mt-3">
<ul class="main-page-input-icons-ul">
<li><i class="fa-solid fa-image"></i></li>
<li><i class="fa-solid fa-square-poll-horizontal"></i></li>
<li><i class="fa-solid fa-face-grin"></i></li>
<li><i class="fa-regular fa-calendar"></i></li>
<li><i class="fa-solid fa-location-dot"></i></li>
</ul>
<button type="submit" class="btn btn-primary rounded-pill px-4 main-page-tweet-button"><strong>Tweet</strong></button>
</div>
</div>
</div>
<!-- </form> -->
</div>
<div class="tweet-feed">
<div class="tweet">
<img src="http://placeimg.com/140/140/people" alt="author profile picture" class="tweet-author-image" />
<div class="tweet-feed-content">
<div class="tweet-header">
Nick Huber
<div class="tweet-author-handle">#sweatystartup</div>
<div class="tweeted-time">8h</div>
</div>
<div class="tweet-content">
<div class="tweet-created-content">It is a wonderful day</div>
</div>
<div class="engagement-icons">
<ul class="engagement-icons-ul">
<li><i class="fa-regular fa-comment"></i></li>
<li><i class="fa-solid fa-retweet"></i></li>
<li><i class="fa-regular fa-heart"></i></li>
<li><i class="fa-solid fa-arrow-up-from-bracket"></i></li>
</ul>
</div>
</div>
</div>
<div class="tweet">
<img src="http://placeimg.com/140/140/animals" alt="author profile picture" class="tweet-author-image" />
<div class="tweet-feed-content">
<div class="tweet-header">
Randall
<div class="tweet-author-handle">#RandallKanna</div>
<div class="tweeted-time">18h</div>
</div>
<div class="tweet-content">
<div class="tweet-created-content">Hey friends</div>
<img src="http://placeimg.com/300/300/tech" alt="tweeter feed" />
</div>
</div>
</div>
</div>
</div>
<div class="col-4">
TODO
</div>
</div>
</div>

Footer is not staying at the bottom of the page

I am creating a portfolio website from scratch. I am stuck on the footer part. The footer I have created for other pages works as intended but for the Resume page it stays in the middle of the page rather than at the bottom of the page. I have already tried to search for similar problem and try their solutions but sadly it didn't work for me.
Here is my HTML code
<!doctype html>
<html>
<head>
<title> Game Programmer </title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="reset-fonts-grids.css"/>
<link rel="stylesheet" type="text/css" href="resume.css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="main.js"></script>
</head>
<body>
<ul id="nav">
<li>Home</li>
<li>Projects</li>
<li><a class="active" href="resume.html">Resume</a></li>
<li>Contact</li>
</ul>
<div id = "container">
<div id="doc2" class="yui-t7">
<div id="inner">
<div id="hd">
<div class="yui-gc">
<div class="yui-u first">
<h1>a</h1>
<h2>Game Programmer</h2>
</div>
<div class="yui-u">
<div class="contact-info">
<h3><a id="pdf" href="#">Download PDF</a></h3>
<h3>1#gmail.com</h3>
</div><!--// .contact-info -->
</div>
</div><!--// .yui-gc -->
</div><!--// hd -->
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<div class="yui-gf">
<div class="yui-u first">
<h2>Profile</h2>
</div>
<div class="yui-u">
<p class="enlarge">
Game Programmer with 2+ years of experience with multiple game engine and a shipped AA title for PC and Consoles. Possesses a Masters in Game Programming.
</p>
</div>
</div><!--// .yui-gf -->
<div class="yui-gf">
<div class="yui-u first">
<h2>Skills</h2>
</div>
<div class="yui-u">
<div class="talent">
<h2>Time Management</h2>
</div>
<div class="talent">
<h2>Strong Work Ethics</h2>
</div>
<div class="talent">
<h2>Team Player</h2>
</div>
</div>
</div><!--// .yui-gf -->
<div class="yui-gf">
<div class="yui-u first">
<h2>Technical</h2>
</div>
<div class="yui-u">
<ul class="talent">
<li>C</li>
<li class="last">C++</li>
</ul>
<ul class="talent">
<li>C#</li>
<li class="last">Unity</li>
</ul>
<ul class="talent">
<li>Unreal Engine 4</li>
<li class="last">SVN / Perforce</li>
</ul>
</div>
</div><!--// .yui-gf-->
<div class="yui-gf">
<div class="yui-u first">
<h2>Experience</h2>
</div><!--// .yui-u -->
<div class="yui-u">
<div class="job">
<h2>a</h2>
<h3>b</h3>
<h4>c</h4>
<p>d</p>
<p>•e</p>
</div>
<div class="job">
<h2>a</h2>
<h3>b</h3>
<h4>c</h4>
<p>d</p>
</div>
<div class="job last">
<h2>a</h2>
<h3>b</h3>
<h4>c</h4>
<p>d</p>
<p>e</p>
</div>
</div><!--// .yui-u -->
</div><!--// .yui-gf -->
<div class="yui-gf last">
<div class="yui-u first">
<h2>Education</h2>
</div>
<div class="yui-u">
<h2>a</h2>
<h3>b</h3>
</div>
<div class="yui-u">
<h2>a</h2>
<h3>b</h3>
</div>
</div><!--// .yui-gf -->
</div><!--// .yui-b -->
</div><!--// yui-main -->
</div><!--// bd -->
</div><!-- // inner -->
</div><!--// doc -->
<!--Footer-->
<footer class="social-footer">
<div class="social-footer-icons">
<ul class="menu-simple">
<li><i class="fa fa-facebook" aria-hidden="true"></i></li>
<li><i class="fa fa-instagram" aria-hidden="true"></i></li>
<li><i class="fa fa-pinterest-p" aria-hidden="true"></i></li>
<li><i class="fa fa-twitter" aria-hidden="true"></i></li>
</ul>
</div>
</footer>
</div>
</body>
</html>
Here is CSS code
body {
background: url(Images/px_by_Gre3g.png);
font: 16px Helvetica, Arial, Sans-Serif; color: #636363;
}
/* //-- yui-grids style overrides -- */
#inner { padding: 10px 80px; margin: 80px auto; background: #f5f5f5; border: solid #666; border-width: 8px 0 2px 0; }
.yui-gf { margin-bottom: 2em; padding-bottom: 2em; border-bottom: 1px solid #ccc; }
/* //-- header, body, footer -- */
#hd { margin: 2.5em 0 3em 0; padding-bottom: 1.5em; border-bottom: 1px solid #ccc }
#hd h2 { text-transform: uppercase; letter-spacing: 2px; }
#bd, #ft { margin-bottom: 2em; }
/* //-- footer -- */
#ft { padding: 1em 0 5em 0; font-size: 92%; border-top: 1px solid #ccc; text-align: center; }
#ft p { margin-bottom: 0; text-align: centezr; }
/* //-- core typography and style -- */
#hd h1 { font-size: 48px; text-transform: uppercase; letter-spacing: 3px; margin-bottom: 10px;}
h2 { font-size: 152% }
h3, h4 { font-size: 122%; }
h1, h2, h3, h4 { color: #333; }
p { font-size: 100%; line-height: 18px; padding-right: 3em; }
a { color: #990003 }
a:hover { text-decoration: none; }
strong { font-weight: bold; }
li { line-height: 24px; border-bottom: 1px solid #ccc; }
p.enlarge { font-size: 144%; padding-right: 6.5em; line-height: 24px; }
p.enlarge span { color: #000 }
.contact-info { margin-top: 7px; }
.first h2 { font-style: italic; }
.last { border-bottom: 0 }
/* //-- section styles -- */
a#pdf { display: block; float: left; background: #666; color: white; padding: 6px 50px 6px 12px; margin-bottom: 6px; text-decoration: none; }
a#pdf:hover { background: #222; }
.job { position: relative; margin-bottom: 1em; padding-bottom: 1em; border-bottom: 1px solid #ccc; }
.job h4 { position: absolute; top: 0.35em; right: 0 }
.job h3 {margin-top : 5px; margin-bottom : 10px;}
.last { border: none; }
.skills-list ul { margin: 0; }
.skills-list li { margin: 3px 0; padding: 3px 0; }
.skills-list li span { font-size: 152%; display: block; margin-bottom: -2px; padding: 0 }
.talent { width: 32%; float: left }
.talent h2 { margin-bottom: 6px; }
#srt-ttab { margin-bottom: 100px; text-align: center; }
#srt-ttab img.last { margin-top: 20px }
/* --// override to force 1/8th width grids -- */
.yui-gf .yui-u{width:80.2%; padding-bottom: 20px;}
.yui-gf div.first{width:12.3%;}
ul#nav{
width: 1300px; list-style: none; overflow: hidden; margin: 80px 18em 0 auto;
}
#nav li {
width: 100px; height: 35px; float: left; padding: 13px 0 0 0;
background: url(Images/nav-bg.png);
font-weight: bold; text-align: center; text-transform: uppercase;
border-radius: 4px;
}
#nav li:nth-child(1) {
margin: 0 10px 0 0;
}
#nav li:nth-child(2) {
margin: 0 10px 0 0;
}
#nav li:nth-child(3) {
margin: 0 10px 0 0;
}
ul#nav li:nth-child(4) {
margin: 0 10px 0 0;
}
ul#nav li a.active {
color:cadetblue;
text-decoration: underline ;
}
ul#nav li a {
color: #616369; text-decoration: none;
}
ul#nav li a:hover {
color: #a12121;
}
#container {
width: 1300px;
margin: 0 250px;
}
.menu-simple {
margin:auto;
list-style:none;
display: inline-block;
}
.menu-simple li {
font-size:20px;
cursor:pointer;
width:100px;
margin:0;
padding:12px 0;
float:left;
display:block;
height:40px;
}
footer {
text-align: center;
position: absolute;
bottom: 0;
padding:10px 0 auto 0;
width: 100%;
}
.social-footer {
bottom:20px;
background: #8a8a8a;
height:50px;
position: absolute;
bottom: 0;
width: inherit;
}
.social-footer .social-footer-icons .fa {
font-size: 30px;
color: #fefefe;
}
.social-footer .social-footer-icons .fa:hover {
color: #4a4a4a;
transition: color 0.15s ease-in;
}
I am not a web designer so don't mind messy code.
Thanks in advance.
I think you need to change the position of both footer and .social-footer to 'relative' instead of 'absolute'
footer {
text-align: center;
//position: absolute;
position: relative;
bottom: 0;
padding:10px 0 auto 0;
width: 100%;
}
.social-footer {
bottom:20px;
background: #8a8a8a;
height:50px;
position: relative;
//position: absolute;
bottom: 0;
width: inherit;
}
This Stackoverflow thread seems to explain the difference between the two and when to use both.
Position Relative vs Absolute?
change your social-footer class like this :
.social-footer {
background: #8a8a8a;
height:50px;
position: relative;
left: 0;
bottom: 0;
width: inherit;
}
body {
background: url(Images/px_by_Gre3g.png);
font: 16px Helvetica, Arial, Sans-Serif; color: #636363;
}
/* //-- yui-grids style overrides -- */
#inner { padding: 10px 80px; margin: 80px auto; background: #f5f5f5; border: solid #666; border-width: 8px 0 2px 0; }
.yui-gf { margin-bottom: 2em; padding-bottom: 2em; border-bottom: 1px solid #ccc; }
/* //-- header, body, footer -- */
#hd { margin: 2.5em 0 3em 0; padding-bottom: 1.5em; border-bottom: 1px solid #ccc }
#hd h2 { text-transform: uppercase; letter-spacing: 2px; }
#bd, #ft { margin-bottom: 2em; }
/* //-- footer -- */
#ft { padding: 1em 0 5em 0; font-size: 92%; border-top: 1px solid #ccc; text-align: center; }
#ft p { margin-bottom: 0; text-align: centezr; }
/* //-- core typography and style -- */
#hd h1 { font-size: 48px; text-transform: uppercase; letter-spacing: 3px; margin-bottom: 10px;}
h2 { font-size: 152% }
h3, h4 { font-size: 122%; }
h1, h2, h3, h4 { color: #333; }
p { font-size: 100%; line-height: 18px; padding-right: 3em; }
a { color: #990003 }
a:hover { text-decoration: none; }
strong { font-weight: bold; }
li { line-height: 24px; border-bottom: 1px solid #ccc; }
p.enlarge { font-size: 144%; padding-right: 6.5em; line-height: 24px; }
p.enlarge span { color: #000 }
.contact-info { margin-top: 7px; }
.first h2 { font-style: italic; }
.last { border-bottom: 0 }
/* //-- section styles -- */
a#pdf { display: block; float: left; background: #666; color: white; padding: 6px 50px 6px 12px; margin-bottom: 6px; text-decoration: none; }
a#pdf:hover { background: #222; }
.job { position: relative; margin-bottom: 1em; padding-bottom: 1em; border-bottom: 1px solid #ccc; }
.job h4 { position: absolute; top: 0.35em; right: 0 }
.job h3 {margin-top : 5px; margin-bottom : 10px;}
.last { border: none; }
.skills-list ul { margin: 0; }
.skills-list li { margin: 3px 0; padding: 3px 0; }
.skills-list li span { font-size: 152%; display: block; margin-bottom: -2px; padding: 0 }
.talent { width: 32%; float: left }
.talent h2 { margin-bottom: 6px; }
#srt-ttab { margin-bottom: 100px; text-align: center; }
#srt-ttab img.last { margin-top: 20px }
/* --// override to force 1/8th width grids -- */
.yui-gf .yui-u{width:80.2%; padding-bottom: 20px;}
.yui-gf div.first{width:12.3%;}
ul#nav{
width: 1300px; list-style: none; overflow: hidden; margin: 80px 18em 0 auto;
}
#nav li {
width: 100px; height: 35px; float: left; padding: 13px 0 0 0;
background: url(Images/nav-bg.png);
font-weight: bold; text-align: center; text-transform: uppercase;
border-radius: 4px;
}
#nav li:nth-child(1) {
margin: 0 10px 0 0;
}
#nav li:nth-child(2) {
margin: 0 10px 0 0;
}
#nav li:nth-child(3) {
margin: 0 10px 0 0;
}
ul#nav li:nth-child(4) {
margin: 0 10px 0 0;
}
ul#nav li a.active {
color:cadetblue;
text-decoration: underline ;
}
ul#nav li a {
color: #616369; text-decoration: none;
}
ul#nav li a:hover {
color: #a12121;
}
#container {
width: 1300px;
margin: 0 250px;
}
.menu-simple {
margin:auto;
list-style:none;
display: inline-block;
}
.menu-simple li {
font-size:20px;
cursor:pointer;
width:100px;
margin:0;
padding:12px 0;
float:left;
display:block;
height:40px;
}
footer {
text-align: center;
position: absolute;
bottom: 0;
padding:10px 0 auto 0;
width: 100%;
}
.social-footer {
background: #8a8a8a;
height:50px;
position: relative;
left: 0;
bottom: 0;
width: inherit;
}
.social-footer .social-footer-icons .fa {
font-size: 30px;
color: #fefefe;
}
.social-footer .social-footer-icons .fa:hover {
color: #4a4a4a;
transition: color 0.15s ease-in;
}
<!doctype html>
<html>
<head>
<title> Game Programmer </title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="reset-fonts-grids.css"/>
<link rel="stylesheet" type="text/css" href="resume.css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="main.js"></script>
</head>
<body>
<ul id="nav">
<li>Home</li>
<li>Projects</li>
<li><a class="active" href="resume.html">Resume</a></li>
<li>Contact</li>
</ul>
<div id = "container">
<div id="doc2" class="yui-t7">
<div id="inner">
<div id="hd">
<div class="yui-gc">
<div class="yui-u first">
<h1>a</h1>
<h2>Game Programmer</h2>
</div>
<div class="yui-u">
<div class="contact-info">
<h3><a id="pdf" href="#">Download PDF</a></h3>
<h3>1#gmail.com</h3>
</div><!--// .contact-info -->
</div>
</div><!--// .yui-gc -->
</div><!--// hd -->
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<div class="yui-gf">
<div class="yui-u first">
<h2>Profile</h2>
</div>
<div class="yui-u">
<p class="enlarge">
Game Programmer with 2+ years of experience with multiple game engine and a shipped AA title for PC and Consoles. Possesses a Masters in Game Programming.
</p>
</div>
</div><!--// .yui-gf -->
<div class="yui-gf">
<div class="yui-u first">
<h2>Skills</h2>
</div>
<div class="yui-u">
<div class="talent">
<h2>Time Management</h2>
</div>
<div class="talent">
<h2>Strong Work Ethics</h2>
</div>
<div class="talent">
<h2>Team Player</h2>
</div>
</div>
</div><!--// .yui-gf -->
<div class="yui-gf">
<div class="yui-u first">
<h2>Technical</h2>
</div>
<div class="yui-u">
<ul class="talent">
<li>C</li>
<li class="last">C++</li>
</ul>
<ul class="talent">
<li>C#</li>
<li class="last">Unity</li>
</ul>
<ul class="talent">
<li>Unreal Engine 4</li>
<li class="last">SVN / Perforce</li>
</ul>
</div>
</div><!--// .yui-gf-->
<div class="yui-gf">
<div class="yui-u first">
<h2>Experience</h2>
</div><!--// .yui-u -->
<div class="yui-u">
<div class="job">
<h2>a</h2>
<h3>b</h3>
<h4>c</h4>
<p>d</p>
<p>•e</p>
</div>
<div class="job">
<h2>a</h2>
<h3>b</h3>
<h4>c</h4>
<p>d</p>
</div>
<div class="job last">
<h2>a</h2>
<h3>b</h3>
<h4>c</h4>
<p>d</p>
<p>e</p>
</div>
</div><!--// .yui-u -->
</div><!--// .yui-gf -->
<div class="yui-gf last">
<div class="yui-u first">
<h2>Education</h2>
</div>
<div class="yui-u">
<h2>a</h2>
<h3>b</h3>
</div>
<div class="yui-u">
<h2>a</h2>
<h3>b</h3>
</div>
</div><!--// .yui-gf -->
</div><!--// .yui-b -->
</div><!--// yui-main -->
</div><!--// bd -->
</div><!-- // inner -->
</div><!--// doc -->
<!--Footer-->
<footer class="social-footer">
<div class="social-footer-icons">
<ul class="menu-simple">
<li><i class="fa fa-facebook" aria-hidden="true"></i></li>
<li><i class="fa fa-instagram" aria-hidden="true"></i></li>
<li><i class="fa fa-pinterest-p" aria-hidden="true"></i></li>
<li><i class="fa fa-twitter" aria-hidden="true"></i></li>
</ul>
</div>
</footer>
</div>
</body>
</html>
Adding this tag to your css made everything seem okay for me!
html {
position: relative;
}
I used this as a reference: How can I position my div at the bottom of its container?
Some other folks have already pointed out that you need to have position set to relative, left set to 0, and only one value defined for the 'bottom' property. I don't want to steal their thunder. While looking through your code, I noticed that a lot of dimensions are hard-coded, though, and you seem to be doing your grid system from scratch. I think you could save yourself a lot of headache and make your page look more professional if you include this
<meta name="viewport" content="width=device-width, initial-scale=1">
in your header and define your dimensions in 'vw' (meaning "percent of view width") instead of px. You would probably be better off than that, even, if you were to at least reuse the grid system from Bootstrap, even if you don't want any styling from the rest of the framework.
Try to change the position from absolute to fixed
footer {
text-align: center;
position: fixed;
bottom: 0;
padding:10px 0 auto 0;
width: 100%;
}
.social-footer {
bottom:20px;
background: #8a8a8a;
height:50px;
position: fixed;
bottom: 0;
width: inherit;
}

News template like layout for menu

I am trying to make a menu which is generated dynamically. Its structure is similar to a newspaper template. I did some research and came to know that using css flexbox we can achieve something like this. However i am still not able to achieve it.
This is the desired look I want:-
To replicate the issue:- click on 'Bilar' menu item-> check the menu -> the 4th menu item is expected to come a bit upwards, but its comes downwards.
Below is the codepen link and my code. Any help is appreciated.
Click this Codepen link to see the current code
$font-stack: OpenSans, Helvetica, sans-serif;
$primary: #e50000;
$primary-hover: #ca0000;
$text-color: #555555;
$white: #ffffff;
$graphic-grey-color: #e1e1e1;
$background-grey-color: #f5f5f5;
$main-dark-color: #202020;
$form-border-color: #dddddd;
$form-active-border-color: #999999;
$navbar-light-color: $main-dark-color;
$link-hover-color: $white;
$link-hover-decoration: none;
$nav-tabs-link-active-bg: $primary;
$navbar-brand-padding-y: 0rem;
$navbar-nav-link-padding-x: 0.9375rem;
$nav-link-padding-y: 0rem;
.header-navigation {
height: 80px;
border-bottom: 2px solid $primary;
.header-brand{
margin-right: 1.4375rem;
height: 100%;
}
}
.header-menu{
height: 100%;
}
.header-menu-item{
font-family: $font-stack;
height: 100%;
color: $main-dark-color;
&:hover {
background-color: $primary;
}
+ .-collapse{
z-index: 1000;
display: none;
position: absolute;
top: 80px;
left: 0px;
// display: none;
opacity: 0;
.menu-item-level2 {
width: 100vw;
margin: auto;
.-level2-main-section{
padding: 0px;
background-color: $background-grey-color;
min-height: 280px;
.-level2-main-section-row{
max-width: 100%;
text-align: center;
margin: 30px 165px 50px 165px;
.-level2-menu-column{
padding: 0px;
text-align: left;
// .-level2-menu-container{
margin-bottom: 30px;
.-heading{
margin-bottom: 10px;
color: $main-dark-color;
font-size: 20px;
font-weight: bold;
line-height: 1.5;
}
.-subitems{
color: $text-color;
font-size: 16px;
line-height: 1.88;
}
// }
}
}
}
.-level2-side-section{
margin: auto;
padding: 20px;
background-color: $graphic-grey-color;
min-height: 280px;
.-info{
margin-bottom: 60px;
.-info-text{
margin-top: 10px;
line-height: 1.5;
font-size: 20px;
color: $text-color;
font-weight: normal;
}
}
}
}
}
}
.header-menu-item.active{
background-color: $primary;
color: $white;
+ .-collapse{
display: block;
opacity: 1;
transition: opacity 500ms linear;
}
}
.header-menu-list {
height: 100%;
}
.navbar{
padding: 0px 0px 0px 30px !important;
color: $text-color;
}
.header-brandname{
margin: 10px 0px;
}
.header-logo{
height: 100%;
padding: 0px 30px;
border-left: 1px solid $graphic-grey-color;
}
Your class col-lg-4 use the following responsive media query:
#media (min-width: 992px) {
.col-lg-4 {
-webkit-box-flex: 0;
-ms-flex: 0 0 33.333333%;
flex: 0 0 25%;
max-width: 33.333333%;
}
}
wich means that once your browser width is higher than 992px, these colums takes 33.33% width and it should be 25% (if you want 4 columns)
EDITED: Just saw your screenshot. css flex wont let you do what you want. If the content is fixed you can just add your 4th menu inside first one container, removing col-lg-4 class like in this codepen (Note I added margin-top inline to make it look better.)
If the content is dinamic you may need to search for any other way to achieve it. masonry came to my mind as first thing I would look into: link
You can use multi column for this layout. I have added on last please check
.header-navigation {
height: 80px;
border-bottom: 2px solid #e50000;
}
.header-navigation .header-brand {
margin-right: 1.4375rem;
height: 100%;
}
.header-menu {
height: 100%;
}$font-stack: OpenSans, Helvetica, sans-serif;
$primary: #e50000;
$primary-hover: #ca0000;
$text-color: #555555;
$white: #ffffff;
$graphic-grey-color: #e1e1e1;
$background-grey-color: #f5f5f5;
$main-dark-color: #202020;
$form-border-color: #dddddd;
$form-active-border-color: #999999;
$navbar-light-color: $main-dark-color;
$link-hover-color: $white;
$link-hover-decoration: none;
$nav-tabs-link-active-bg: $primary;
$navbar-brand-padding-y: 0rem;
$navbar-nav-link-padding-x: 0.9375rem;
$nav-link-padding-y: 0rem;
.header-navigation {
height: 80px;
border-bottom: 2px solid $primary;
.header-brand {
margin-right: 1.4375rem;
height: 100%;
}
}
.header-menu {
height: 100%;
}
.header-menu-item {
font-family: $font-stack;
height: 100%;
color: $main-dark-color;
&:hover {
background-color: $primary;
}
+ .-collapse {
z-index: 1000;
display: none;
position: absolute;
top: 80px;
left: 0px;
// display: none;
opacity: 0;
.menu-item-level2 {
width: 100vw;
margin: auto;
.-level2-main-section {
padding: 0px;
background-color: $background-grey-color;
min-height: 280px;
.-level2-main-section-row {
max-width: 100%;
text-align: center;
margin: 30px 165px 50px 165px;
.-level2-menu-column {
padding: 0px;
text-align: left;
// .-level2-menu-container{
margin-bottom: 30px;
.-heading {
margin-bottom: 10px;
color: $main-dark-color;
font-size: 20px;
font-weight: bold;
line-height: 1.5;
}
.-subitems {
color: $text-color;
font-size: 16px;
line-height: 1.88;
}
// }
}
}
}
.-level2-side-section {
margin: auto;
padding: 20px;
background-color: $graphic-grey-color;
min-height: 280px;
.-info {
margin-bottom: 60px;
.-info-text {
margin-top: 10px;
line-height: 1.5;
font-size: 20px;
color: $text-color;
font-weight: normal;
}
}
}
}
}
}
.header-menu-item.active {
background-color: $primary;
color: $white;
+ .-collapse {
display: block;
opacity: 1;
transition: opacity 500ms linear;
}
}
.header-menu-list {
height: 100%;
}
.navbar {
padding: 0px 0px 0px 30px !important;
color: $text-color;
}
.header-brandname {
margin: 10px 0px;
}
.header-logo {
height: 100%;
padding: 0px 30px;
border-left: 1px solid $graphic-grey-color;
}
.menu-wrap {
display: block;
}
.row.-level2-main-section-row {
display: block;
column-count: 3;
}
.-level2-menu-column {
display: block;
}
.header-menu-item {
font-family: OpenSans, Helvetica, sans-serif;
height: 100%;
color: #202020;
}
.header-menu-item:hover {
background-color: #e50000;
}
.header-menu-item + .-collapse {
z-index: 1000;
display: none;
position: absolute;
top: 80px;
left: 0px;
opacity: 0;
}
.header-menu-item + .-collapse .menu-item-level2 {
width: 100vw;
margin: auto;
}
.header-menu-item + .-collapse .menu-item-level2 .-level2-main-section {
padding: 0px;
background-color: #f5f5f5;
min-height: 280px;
}
.header-menu-item + .-collapse .menu-item-level2 .-level2-main-section .-level2-main-section-row {
max-width: 100%;
text-align: center;
margin: 30px 165px 50px 165px;
}
.header-menu-item + .-collapse .menu-item-level2 .-level2-main-section .-level2-main-section-row .-level2-menu-column {
padding: 0px;
text-align: left;
margin-bottom: 30px;
}
.header-menu-item + .-collapse .menu-item-level2 .-level2-main-section .-level2-main-section-row .-level2-menu-column .-heading {
margin-bottom: 10px;
color: #202020;
font-size: 20px;
font-weight: bold;
line-height: 1.5;
}
.header-menu-item + .-collapse .menu-item-level2 .-level2-main-section .-level2-main-section-row .-level2-menu-column .-subitems {
color: #555555;
font-size: 16px;
line-height: 1.88;
}
.header-menu-item + .-collapse .menu-item-level2 .-level2-side-section {
margin: auto;
padding: 20px;
background-color: #e1e1e1;
min-height: 280px;
}
.header-menu-item + .-collapse .menu-item-level2 .-level2-side-section .-info {
margin-bottom: 60px;
}
.header-menu-item + .-collapse .menu-item-level2 .-level2-side-section .-info .-info-text {
margin-top: 10px;
line-height: 1.5;
font-size: 20px;
color: #555555;
font-weight: normal;
}
.header-menu-item.active {
background-color: #e50000;
color: #ffffff;
}
.header-menu-item.active + .-collapse {
display: block;
opacity: 1;
transition: opacity 500ms linear;
}
.header-menu-list {
height: 100%;
}
.navbar {
padding: 0px 0px 0px 30px !important;
color: #555555;
}
.header-brandname {
margin: 10px 0px;
}
.header-logo {
height: 100%;
padding: 0px 30px;
border-left: 1px solid #e1e1e1;
}
.menu-wrap {
display: block;
}
.row.-level2-main-section-row {
display: block;
column-count: 3;
}
.-level2-menu-column {
display: block;
}
<header class="header">
<nav class="header-navigation navbar navbar-expand-lg">
<a class="header-brand navbar-brand d-flex align-items-center pull-left" href="#">
<img src="/static/images/fc-logo.svg" alt="brand-logo">
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#header-navigation" aria-controls="header-navigation"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="header-menu collapse navbar-collapse" id="header-navigation">
<ul class="header-menu-list navbar-nav mr-auto">
<li class="nav-item">
<a class="header-menu-item nav-link d-flex align-items-center" href="#">
<span>Bilar</span>
</a>
<div class="-collapse">
<div class="menu-item-level2 row">
<div class="-level2-main-section col-lg-10">
<div class="menu-wrap">
<div class="-level2-main-section-row row align-items-start">
<div class="-level2-menu-column -level2-menu-container col-lg-4">
<div class="-heading">Nya bilar</div>
<div class="-subitems">Personbilar</div>
<div class="-subitems">Transportbilar</div>
</div>
<div class="-level2-menu-column -level2-menu-container col-lg-4">
<div class="-heading">Nya bilar</div>
<div class="-subitems">Personbilar</div>
<div class="-subitems">Transportbilar</div>
<div class="-subitems">Personbilar</div>
<div class="-subitems">Transportbilar</div>
<div class="-subitems">Personbilar</div>
<div class="-subitems">Transportbilar</div>
<div class="-subitems">Personbilar</div>
<div class="-subitems">Transportbilar</div>
<div class="-subitems">Personbilar</div>
<div class="-subitems">Transportbilar</div>
</div>
<div class="-level2-menu-column -level2-menu-container col-lg-4">
<div class="-heading">Nya bilar</div>
<div class="-subitems">Personbilar</div>
<div class="-subitems">Transportbilar</div>
</div>
<div class="-level2-menu-column -level2-menu-container col-lg-4">
<div class="-heading">Nya bilar</div>
<div class="-subitems">Personbilar</div>
<div class="-subitems">Transportbilar</div>
</div>
</div>
</div>
</div>
<div class="-level2-side-section col-lg-2">
<div class="-info">
<a class="-info-img" href="#">
<img src="/static/images/car.png" alt="info-image-1">
</a>
<div class="-info-text">
Vilken Yaris ar du?
</div>
</div>
<div class="-info">
<a class="-info-img" href="#">
<img src="/static/images/car2.png" alt="info-image-2">
</a>
<div class="-info-text">
Basta familjebilen - 7 sittplatser!
</div>
</div>
</div>
</div>
</li>
<li class="nav-item ">
<a class="header-menu-item nav-link d-flex align-items-center" href="#">
<span>Finansiering</span>
</a>
</li>
<li class="nav-item ">
<a class="header-menu-item nav-link d-flex align-items-center" href="#">
<span>Service</span>
</a>
</li>
<li class="nav-item ">
<a class="header-menu-item nav-link d-flex align-items-center" href="#">
<span>Om oss</span>
</a>
</li>
<li class="nav-item ">
<a class="header-menu-item nav-link d-flex align-items-center" href="#">
<span>Min Toyota</span>
</a>
</li>
</ul>
</div>
<a href="#" class="header-logo pull-right d-flex align-items-center">
<img src="/static/images/toyota-logo.jpg" alt="brand-logo">
</a>
</nav>
</header>
Link
One way is using CSS column, but is is not widely supported. You can check its Browser compatibility here.
If you decide to do so, remember you can not combine it with flex. Hence, no Bootstrap flex classes for this part of your page.
Use column-count: #x for the number of columns in row.
Use break-inside: avoid; to avoid break column break.
.-level2-main-section-row {
border: 1px solid;
-moz-column-count: 3;
-webkit-column-count: 3;
column-count: 3;
column-count: 3;
}
.-level2-menu-column {
margin-bottom: 10px;
border: 1px solid red;
-webkit-column-break-inside: avoid;
page-break-inside: avoid;
break-inside: avoid;
}
<div class="menu-wrap">
<div class="-level2-main-section-row align-items-start">
<div class="-level2-menu-column -level2-menu-container ">
<h1 class="-heading">Nya bilar</h1>
<div class="-subitems">Personbilar</div>
<div class="-subitems">Transportbilar</div>
</div>
<div class="-level2-menu-column -level2-menu-container ">
<h1 class="-heading">Nya bilar</h1>
<div class="-subitems">Personbilar</div>
<div class="-subitems">Transportbilar</div>
<div class="-heading">Nya bilar</div>
<div class="-subitems">Personbilar</div>
<div class="-subitems">Transportbilar</div>
<div class="-heading">Nya bilar</div>
<div class="-subitems">Personbilar</div>
<div class="-subitems">Transportbilar</div>
<div class="-heading">Nya bilar</div>
<div class="-subitems">Personbilar</div>
<div class="-subitems">Transportbilar</div>
<div class="-heading">Nya bilar</div>
<div class="-subitems">Personbilar</div>
<div class="-subitems">Transportbilar</div>
</div>
<div class="-level2-menu-column -level2-menu-container ">
<h1 class="-heading">Nya bilar</h1>
<div class="-subitems">Personbilar</div>
<div class="-subitems">Transportbilar</div>
</div>
<div class="-level2-menu-column -level2-menu-container ">
<h1 class="-heading">Nya bilar</h1>
<div class="-subitems">Personbilar</div>
<div class="-subitems">Transportbilar</div>
<div class="-subitems">Personbilar</div>
<div class="-subitems">Transportbilar</div>
<div class="-subitems">Personbilar</div>
<div class="-subitems">Transportbilar</div>
<div class="-subitems">Personbilar</div>
<div class="-subitems">Transportbilar</div>
<div class="-subitems">Personbilar</div>
<div class="-subitems">Transportbilar</div>
</div>
<div class="-level2-menu-column -level2-menu-container ">
<h1 class="-heading">Nya bilar</h1>
<div class="-subitems">Personbilar</div>
<div class="-subitems">Transportbilar</div>
</div>
<div class="-level2-menu-column -level2-menu-container">
<h1 class="-heading">Nya bilar</h1>
<div class="-subitems">Personbilar</div>
<div class="-subitems">Transportbilar</div>
</div>
</div>
</div>
Check this pen
You can set different column per page using media queries.
Update
An another problem with column is that it does not respect the order you lay down the columns. Therefore, if its important to order the columns, you may go for masonry or some other Javascript library.
This article is a good read on this topic.

Rows aren't collapsing on mobile view

My bootstrap rows are not stacking on top of each other in mobile view. I have a row of 3 cols and a row of 4 cols. The rows that aren't collapsing are the .about-content row in the #about section and 4 col row is in the #member section. Any help would be appreciated, Thanks! Here's the website: https://alex-carver.github.io/Smart-Carnival/
/*element style--------*/
section{
margin-top: 100px;
margin-bottom: 100px;
width: 100%;
}
hr{
width: 100%;
margin-left: auto;
margin-right: auto;
background-color: #c1282d;
height: 4px;
}
.hr-2{
width: 100%;
margin-left: auto;
margin-right: auto;
background-color: #fff;
height: 4px;
}
h1, h2{
font-family: 'chunkfiveregular' , sans-serif;
}
h2{
font-size: 45px;
color: #020304;
}
p{
font-family:'proxima_novasemibold' , sans-serif;
}
/*---nav styles----------*/
nav, .navbar .navbar-default{
margin-bottom: 0!important;
height: 80px;
}
.navbar-default {
background-color: #fff;
border-color: transparent;
position: absolute;
left: 0px;
top: 0px;
width: 100%;
height: 80px;
z-index: 4;
opacity: .9;
}
.navbar-right {
margin-right: 20px;
padding-top: 25px;
background:transparent!important;
}
.navbar-default .navbar-brand {
color:#c1282d;
}
.navbar-brand .logo{
float: left;
height: 60px;
padding-bottom: 10px;
}
.navbar-default .navbar-nav>li>a {
color:#c1282d;
font-size: 22px;
background:#fff;
font-family: 'proxima_novasemibold', sans-serif;
font-weight: 400;
}
.navbar-default .navbar-nav>.open>a, .navbar-default .navbar-nav>.open>a:focus, .navbar-default .navbar-nav>.open>a:hover {
color: #fff;
background-color: #c1282d;
}
.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
display: none;
float: left;
min-width: 160px;
padding: 5px 0;
margin: 2px 0 0;
font-size: 14px;
text-align: left;
list-style: none;
background-color: #c1282d;
-webkit-background-clip: padding-box;
background-clip: padding-box;
border: 1px solid #ccc;
border: 1px solid rgba(0,0,0,.15);
border-radius: 4px;
-webkit-box-shadow: 0 6px 12px rgba(0,0,0,.175);
box-shadow: 0 6px 12px rgba(0,0,0,.175);
color:#fff;
}
.dropdown-menu>li>a{
color: #fff;
font-size: 15px;
}
.navbar-right{
margin-right: 20px;
}
/*-------header styles-------*/
header{
width:100%;
height: 710px;
background:url(../img/header2.png);
background-position: center;
background-repeat: no-repeat;
margin:0;
padding: 0;
}
.jumbotron{
background: transparent;
margin-top: 45px;
color:#fff;
width:100%;
}
.header-text-color{
color: #c1282d;
font-size: 90px;
}
.jumbotron h1{
margin-bottom: 25px;
font-size: 80px;
letter-spacing: 3px;
font-family: 'chunkfiveregular' , sans-serif!important;
}
.jumbotron p {
margin-bottom: 25px;
font-size: 30px;
font-family: 'proxima_novasemibold' , sans-serif;
}
.btn-primary{
background:#c1282d;
color:#fff;
border:none;
box-shadow: 3px 5px 5px rgba(0,0,0,0.5);
margin-right: 20px;
font-family: 'proxima_novathin' , sans-serif;
padding:15px;
}
.btn-primary:hover{
background:#fff;
color: #c1282d;
-webkit-transition: .5s ease-in-out;
transition: .5s ease-in-out;
}
.photos-btn{
background:#828383;
color: #fff;
}
.social-icons {
margin-left: 20px;
margin-top: 5px;
}
.social-icons a{
color: #fff;
}
.social-icons a:hover{
color: #c1282d;
-webkit-transition: .5s ease-in-out;
transition: .5s ease-in-out;
}
i {
margin-right: 5px;
}
/*-------------About Section----------*/
.about-text-color{
color:#c1282d;
font-size: 50px;
}
.about-content{
height: 400px;
text-align: center;
padding:20px;
font-size: 20px;
font-family: 'proxima_novasemibold' , sans-serif;
}
.about-text{
padding:50px;
font-size: 30px;
background: #f2f2f2;
border-radius: 10px;
margin-top: 20px;
color: #020304;
}
/*-------Team Section Styles---------*/
#team{
height: 520px;
border-top: 1px solid #828383;
}
.member-heading{
margin-top: 40px;
}
.member-text-color{
color: #c1282d;
font-size: 50px;
}
.member-wrapper{
background:#fff;
border-radius: 10px;
padding:20px;
box-shadow: 6px 5px 5px rgba(0,0,0,0.5);
margin-left: auto;
margin-right: auto;
}
.member-content{
background:#c1282d;
text-align: center;
padding:20px;
color: #020304;
font-family: 'proxima_novasemibold' , sans-serif;
margin-top:20px;
}
/*----------Footer Styles------------*/
footer{
width: 100%;
text-align: center;
margin:0;
}
.footer-logo{
height: 100px;
width: 300px;
text-align: center;
}
/*----------media queries----------*/
#media (max-width: 767px){
.navbar-nav .open .dropdown-menu {
position: static;
float: none;
width: 100%;
margin-top: 0;
background-color:#c1282d;
border: 0;
-webkit-box-shadow: none;
box-shadow: none;
}
.navbar-default .navbar-nav .open .dropdown-menu>li>a {
color: #020304;
}
.navbar-default .navbar-nav>li>a {
color: #c1282d;
font-size: 22px;
background: #fff;
font-family: 'Roboto', sans-serif;
font-weight: 400;
border:1px, solid #000;
}
.navbar-default .navbar-nav>li>a:focus, .navbar-default .navbar-nav>li>a:hover {
color: #020304;
background-color: #fff;
}
}
/* ----------- iPhone 6, 6S, 7 and 8 ----------- */
/* Portrait and Landscape */
#media only screen
and (min-device-width: 375px)
and (max-device-width: 667px)
and (-webkit-min-device-pixel-ratio: 2) {
.navbar-brand {
float: left;
height: 50px;
padding: 15px 30px;
font-size: 30px;
line-height: 20px;
font-weight: 400;
font-family: 'Roboto', sans-serif;
}
.navbar-default .navbar-toggle {
border-color: #c1282d;
}
.navbar-default .navbar-toggle .icon-bar {
background-color: #c1282d;
}
header{
width:100%;
height: 670px;
background: linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, .5)), url("../img/header2.png") no-repeat center;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
margin:0;
padding: 0;
}
.jumbotron{
background: transparent;
margin-top: 120px;
color:#fff;
padding-bottom: 0px;
margin-bottom: 0px;
}
.social-icons-small a{
color: #fff;
}
.social-icons-small a:hover{
color: #c1282d;
-webkit-transition: .5s ease-in-out;
transition: .5s ease-in-out;
}
#team{
height: 800px;
border-top: 1px solid #828383;
}
.jumbotron h1{
margin-bottom: 20px;
font-size: 40px;
letter-spacing: 3px;
font-family: 'chunkfiveregular' , sans-serif!important;
}
.header-text-color{
color: #c1282d;
font-size: 40px;
}
/*-------------About Section----------*/
h2{
font-size: 40px;
color: #020304;
}
.about-text-color{
color:#c1282d;
font-size: 40px;
}
.about-content{
height: 400px;
padding:20px;
font-size: 20px;
font-family: 'proxima_novasemibold' , sans-serif;
}
.about-text{
padding:50px;
font-size: 20px;
background: #f2f2f2;
border-radius: 10px;
margin-top: 20px;
color: #020304;
text-align: left;
}
/*-------Team Section Styles---------*/
#team{
width: 100%;
border-top: 1px solid #828383;
height: 400px;
}
.member-heading{
margin-top: 40px;
}
.member-text-color{
color: #c1282d;
font-size: 40px;
}
.member-wrapper{
background:#fff;
border-radius: 10px;
padding:20px;
box-shadow: 6px 5px 5px rgba(0,0,0,0.5);
width: 100%;
}
.member-content{
background:#c1282d;
text-align: center;
padding:0px;
color: #020304;
font-family: 'proxima_novasemibold' , sans-serif;
margin-top:20px;
font-size: 15px;
}
.photos-btn{
background:#828383;
color: #fff;
}
}
<!DOCTYPE html>
<html lang="eng">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<head>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="./css/custom.css">
<title>Smart Carnival</title>
</head>
<body>
<nav class="navbar navbar-default">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#myNavbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html"><img class="logo img-responsive" src="./img/logo.png"></a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav navbar-right">
<li>Find My Photos</li>
<li class="dropdown">
About Us <span class="caret"></span>
<ul class="dropdown-menu">
<li>Why Smart Carnival</li>
<li>The Team</li>
</ul>
</li>
<li class="dropdown">
Clients <span class="caret"></span>
<ul class="dropdown-menu">
<li>Products</li>
<li>Value Proposition</li>
<li>Pricing</li>
</ul>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<header>
<div class="container">
<div class="jumbotron">
<h1><span class="header-text-color">S</span>mart <span class="header-text-color">C</span>arnival</h1>
<p>Modernizing and Amplifying the Attractions<br>and Amusements Industry.</p>
<p class="contact-button"><a class="btn btn-primary btn-lg" href="#" role="button">Contact Us</a><span><a class="photos-btn btn btn-primary btn-lg" href="#" role="button">Find My Photos</a></span></p>
</div>
</div>
</header>
<section id="about">
<div class="container">
<div class="row">
<div class="col-xs-12 text-center">
<h2>Why<span class="about-text-color"> Smart Carnival</span></h2>
<hr>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-xs-12 text-center">
<p class="about-text">
Smart Carnival’s mission is to modernize the amusement, carnival and inflatables industries with hardware and software that enhances the <br>carnival-goer’s experience and enhances revenue for its customers.
</p>
</div>
</div>
<div class="row about-content">
<div class="col-xs-4">
<img class="img-responsive" src="./img/camera.png">
<p class="text-content" >Smart Carnival’s camera is waterproof and has a super hydrophobic lens, so water will never ruin your photo. </p>
</div>
<div class="col-xs-4">
<img class="img-responsive" src="./img/photos.png">
<p class="text-contentt">Photos and slow motion videos can be edited, clipped, filtered downloaded straight to your phone or shared on social media! No other company offers as seamless a photo experience.</p>
</div>
<div class="col-xs-4">
<img class="img-responsive" src="./img/battery.png">
<p class="text-content">With an 8 hour battery life, Smart Carnival captures the special and fun moments all day long without needing to be recharged or replaced.</p>
</div>
</div>
</div>
</section>
<section id="team">
<div class="container">
<div class="row">
<div class="col-xs-12 text-center">
<h2 class="member-heading">The<span class="member-text-color"> Smart Carnival </span>Team</h2>
</div>
</div>
</div>
<div class="container-fluid">
<div class="row member-content">
<div class="col-xs-3">
<div class="member-wrapper">
<img class="img-responsive" src="./img/member1.png">
<p class="text-content" >Jesse Ou<br>
Founder & CEO</p><br>
<p class="text-content">Lead Security Engineer,<br>Salesforce.com</p>
</div>
</div>
<div class="col-xs-3">
<div class="member-wrapper">
<img class="img-responsive" src="./img/member2.png">
<p class="text-content" >Larry Trowell<br>
CTO</p><br>
<p class="text-content">Principal Consaltunt,<br><b>Synopsys</b></p>
</div>
</div>
<div class="col-xs-3">
<div class="member-wrapper">
<img class="img-responsive" src="./img/member3.png">
<p class="text-content" >Josh Johns<br>
Co Founder & Sales</p><br>
<p class="text-content">Owner<br><b>J. Johns Studios</b></p>
</div>
</div>
<div class="col-xs-3">
<div class="member-wrapper">
<img class="img-responsive" src="./img/member4.png">
<p class="text-content" >Sara Abernethy<br>
Director of Business Development</p><br>
<p class="text-content"><b>Senior Strategist,<br>Idea Couture</b></p>
</div>
</div>
</div>
</div>
</section>
<!-- ==========================
FOOTER SECTION
=========================== -->
<footer>
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 text-center">
<img class="footer-logo" src="./img/logo.png">
<p>All Rights Reserved. © 2018 Smart Carnival</p>
</div>
</div>
</div>
</footer>
<!-- ==========================
FOOTER SECTION END
=========================== -->
<script
src="https://code.jquery.com/jquery-3.2.1.min.js"
integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</body>
</html>
https://alex-carver.github.io/Smart-Carnival/
They aren't collapsing because you specified them to be uncollapsable.
col-xs-* means at the smallest screen.
So, 3x col-xs-4 is 12 which is a full row.

How to align mobile navbar with logo using bootstrap

I am editing a template and I am having trouble getting the navigation menu button to align next to my logo when viewed on mobile devices. It also slightly covers the header image on mobile as well.
Mobile view
Desktop view
Any help is greatly appreciated! Here is my code:
#import url(http://fonts.googleapis.com/css?family=Dosis:400,200,300,500,600,700,800);
#import url(http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz:400,300,200,700);
/*************************
*******Typography******
**************************/
body {
font-family: 'Dosis', sans-serif;
font-size: 17px;
color: #fff
}
.btn {
border-radius: 0;
font-family: 'Yanone Kaffeesatz','sans-serif';
font-size: 20px;
padding: 9px 23px;
}
a {
-webkit-transition: 300ms;
-moz-transition: 300ms;
-o-transition: 300ms;
transition: 300ms;
}
a:focus,
a:hover {
text-decoration: none;
outline: none
}
h1, h2, h3, h4, h5, h6 {
font-family: 'Yanone Kaffeesatz', 'sans-serif';
font-weight: 300;
text-transform: uppercase;
}
h2 {
font-size: 36px
}
.navbar-toggle {
margin-top: 12px
}
.navbar-toggle .icon-bar {
background-color: #fff;
}
.navbar-toggle,
.navbar-toggle:focus {
border:1px solid #fff;
outline: none;
}
/*************************
*******Header CSS******
**************************/
.header-top {
display: block;
overflow: hidden;
padding: 25px;
}
.main-nav {
position: absolute;
width: 100%;
z-index: 999;
}
.main-nav
.container {
width: 100%
}
.social-icons a {
font-size: 18px;
color: #fff;
padding-left:20px;
}
.social-icons .fa-facebook:hover {
color: #3B5997
}
.social-icons .fa-twitter:hover {
color:#29C5F6
}
.social-icons .fa-google-plus:hover {
color:#D13D2F
}
.social-icons .fa-youtube:hover{
color: #ec5538
}
.navbar-brand {
background-color: #ff0080;
height: 90px;
margin-bottom: 20px;
position: relative;
width: 435px;
}
.navbar-brand img {
position: absolute;
top: -35px;
}
.navbar-right {
background-color: #ff0080;
padding:0 95px 0 0;
opacity: .9
}
.navbar-right li a {
padding: 35px 21px;
font-size: 22px;
color: #fff;
text-transform: uppercase;
font-family: 'Yanone Kaffeesatz', 'sans-serif';
font-weight: 300;
}
.navbar-right li a:hover,
.navbar-right li a:focus,
.navbar-right .active a {
background-color: #fff;
color: #16728f
}
.fixed-menu {
background-color: #ff0080;
position: fixed;
top: 0;
}
.fixed-menu .navbar-right {
padding: 0;
}
.fixed-menu .navbar-right li a {
font-size: 18px;
padding: 20px 25px;
text-shadow:inherit;
}
.fixed-menu .navbar-brand {
height: 60px;
margin-top: 0;
padding: 0;
margin-bottom: 0;
width: 435px;
}
.fixed-menu .navbar-brand img {
height:60px;
top: 0;
}
.fixed-menu .header-top {
display: none;
}
/*************************
*******Home CSS******
**************************/
#home {
position: relative;
overflow: hidden;
}
#main-slider img {
width: 100%
}
#main-slider
.carousel-caption {
background: none repeat scroll 0 0 #000000;
bottom: 14%;
float: left;
left: 0;
opacity: 0.8;
padding:10px 60px 35px;
right: inherit;
text-transform: uppercase;
color: #fff;
text-align: left;
}
#main-slider
.carousel-caption h2 {
font-size: 38px;
}
#main-slider
.carousel-caption h4 {
font-size: 24px;
}
#main-slider
.carousel-caption a {
font-size: 22px;
color: #2da1c5
}
#main-slider
.carousel-caption a:hover {
color: #2588a6
}
#main-slider
.carousel-caption a:hover i {
margin-left: 35px
}
#main-slider
.carousel-caption a i {
margin-left: 15px;
-webkit-transition: all 0.3s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
-ms-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
}
#main-slider
.carousel-indicators li {
background-color:#ff0080;
border: 1px solid #ff0080;
}
#main-slider
.carousel-indicators li.active {
background-color:#fff;
border: 1px solid #fff;
}
/*************************
*******Explore CSS******
**************************/
#explore {
background-color: #C34C39;
background-image: url("../images/event-bg.jpg");
background-position: center bottom;
background-size: contain;
background-repeat:no-repeat;
position: relative;
overflow: hidden;
padding: 130px 0 100px;
}
.watch {
position: absolute;
left: 0;
top: 7%;
}
#explore h2 {
font-size: 42px;
text-transform: uppercase;
text-align: center;
}
#countdown {
display: block;
overflow: hidden;
text-align: center;
padding: 0
}
#countdown li {
list-style: none;
display:inline-block;
margin-right: 40px;
text-align: center;
text-transform: uppercase;
font-size: 18px;
position: relative;
}
#countdown li:last-child {
margin-right: 0
}
#countdown li span {
display: block;
font-size: 40px;
font-weight: 700;
height: 82px;
line-height: 79px;
width: 75px;
border-radius: 10px;
border-right: 1px solid #c34c39;
border-bottom: 1px solid #c34c39;
}
#countdown li .days {
background-color: #45b29d;
border-top: 1px solid #c34c39;
border-left: 1px solid #c34c39;
}
#countdown li .hours {
background-color: #efc94c;
border-top: 1px solid #c34c39;
border-left: 1px solid #c34c39;
}
#countdown li .minutes {
background-color: #e27a3f;
border-top: 1px solid #c34c39;
border-left: 1px solid #c34c39;
}
#countdown li .seconds {
background-color: #df5a49;
border-top: 1px solid #c34c39;
border-left: 1px solid #c34c39;
}
#countdown li:before {
background-color: #c34c39;
content: "";
height: 11px;
left: 0;
position: absolute;
top: 36px;
width: 1px;
}
#countdown li:after {
background-color: #c34c39;
content: "";
height: 11px;
right:0;
position: absolute;
top: 36px;
width: 1px;
}
.cart {
background-color: #b34534;
position: absolute;
right:-200px;
top: 37%;
width:252px;
-webkit-transition: all 0.7s ease-in-out;
-moz-transition: all 0.7s ease-in-out;
-ms-transition: all 0.7s ease-in-out;
-o-transition: all 0.7s ease-in-out;
transition: all 0.7s ease-in-out;
}
.cart:hover {
right:0;
}
.cart a {
color: #FFFFFF;
display: block;
font-size: 24px;
text-transform: uppercase;
}
.cart a i {
font-size: 30px;
padding: 20px 12px;
background-color: #A64030;
margin-right: 3px;
}
/*************************
*******Event CSS******
**************************/
#event {
background-color: #33888F;
background-image: url("../images/performar-bg.jpg");
background-position: 50% 0;
background-size: contain;
position: relative;
background-repeat: no-repeat;
}
.guitar {
position: absolute;
right:0;
top: 0
}
#event h2 {
color: #FFFFFF;
font-size: 36px;
font-weight: 300;
margin-bottom: 40px;
margin-top: 70px;
text-transform: uppercase;
}
.single-event {
margin-bottom: 70px;
}
.single-event h4 {
color: #FFFFFF;
font-size: 24px;
font-weight: 300;
line-height: 26px;
margin-top: 25px;
text-transform: uppercase;
}
.single-event h5 {
font-size: 18px;
font-weight: 100;
display: block;
}
#event-carousel {
position: relative;
}
.even-control-left,
.even-control-right {
position: absolute;
font-size: 24px;
color: #fff;
top: 0;
}
.even-control-left {
right: 3%
}
.even-control-right {
right: 0;
}
/*************************
*******About CSS**********
**************************/
#about {
background-color: #75B46E;
position: relative;
width: 100%;
display: flex;
}
.guitar2 {
top: 0;
width: 50%;
}
.guitar2 img {
padding-top: 3%;
}
.about-content {
width: 50%;
background-image: url("../images/about-bg.jpg");
background-position: left bottom;
background-repeat: no-repeat;
background-size: cover;
padding: 70px 70px 110px;
}
#about h2 {
margin-bottom: 23px;
}
.about-content p {
font-size: 17px;
font-family: 'Dosis',sans-serif;
}
#about .btn-primary {
background-color: #137c61;
color: #fff;
text-transform: capitalize;
border: none;
margin-top: 28px;
}
#about .btn-primary:hover {
background-color: #126d55
}
/*************************
******Twitter CSS****
**************************/
#twitter {
background-color: #ecedef;
background-image: url("../images/twitter-bg.jpg");
background-position: center bottom;
background-size: cover;
background-repeat:no-repeat;
position: relative;
padding: 95px 0 90px;
overflow: hidden;
}
.twit {
position: absolute;
left: 0;
top:-42%;
}
#twitter-feed .item {
text-align: center;
}
#twitter-feed .item img {
display: inline-block;
width: 78px;
height: 78px;
border-radius: 50%;
background-color: #c5c8ce;
padding: 5px;
margin-bottom: 30px;
}
#twitter-feed .item a,
#twitter-feed .item p {
font-size: 24px;
font-weight: 300;
font-family: 'Yanone Kaffeesatz','sans-serif';
}
#twitter-feed .item p {
color: #3D3D3D;
}
#twitter-feed .item a {
color:#00c3ff;
}
.twitter-control-left,
.twitter-control-right {
position: absolute;
color: #00c3ff;
top: 59%;
font-size: 24px
}
.twitter-control-left {
left: 0;
}
.twitter-control-right {
right:0;
}
/*************************
******Sponsor CSS****
**************************/
#sponsor {
background-color: #1881a2;
background-image: url("../images/sponsor-bg.jpg");
background-position:50% 0;
background-size: cover;
background-repeat:no-repeat;
position: relative;
}
.light {
position: absolute;
right: 0;
bottom: 0;
}
#sponsor .col-sm-10 {
z-index: 10;
}
#sponsor h2 {
margin-top: 90px;
margin-bottom: 40px;
}
#sponsor .item ul {
font-size: 0;
padding: 0;
}
#sponsor .item ul li {
display: inline-block;
list-style: none;
width: 33.33%;
margin-bottom: 75px;
}
#sponsor .item ul li:last-child {
margin-right: 0
}
.sponsor-control-left,
.sponsor-control-right {
color: #FFFFFF;
font-size: 24px;
position: absolute;
top: 20%;
}
.sponsor-control-left {
right: 12%
}
.sponsor-control-right {
right: 10%
}
/*************************
******Map CSS****
**************************/
#map {
position: relative;
}
#gmap {
height:450px;
}
/*************************
******Contact CSS****
**************************/
.contact-section {
background-color: #f7ab24;
background-image: url("../images/contact-bg.jpg");
background-position:60% 0;
background-size:contain;
background-repeat:no-repeat;
position: relative;
}
.ear-piece {
position: absolute;
left: 0;
top: 0;
}
#contact .container {
padding-top:47px;
}
#contact h3 {
text-transform:inherit;
color: #373737;
}
#contact-section h3 {
margin-bottom: 25px
}
#contact address {
font-size: 18px;
color: #373737;
}
.contact-text {
margin-bottom: 35px;
display: block;
}
#contact-section .form-control {
border-color: #ae750d;
box-shadow:none;
outline: 0 none;
border-radius: 0;
color: #797979;
font-size: 18px;
}
#contact-section .form-control:focus {
border-color: #ae750d;
}
#contact-section input {
height: 44px;
}
#contact-section textarea {
height: 90px;
resize:none;
}
#contact-section .btn-primary {
background-color: #373737;
color: #f7ab24;
border: none;
font-size: 24px;
padding: 6px 42px;
margin-bottom: 110px;
margin-top: 10px
}
#contact-section .btn-primary:hover {
background-color: #212020;
color: #fff
}
/*************************
******Footer CSS****
**************************/
#footer {
background-color: #212121;
background-image: url("../images/footer-bg.jpg");
background-position: center bottom;
background-repeat: no-repeat;
background-size: cover;
color: #FFFFFF;
font-size: 20px;
padding: 35px 0;
}
#footer a {
color:#f7ab24
}
#footer a:hover {
color:#ff0080
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>Melodie Rooker Music</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link href="css/main.css" rel="stylesheet">
<link href="css/animate.css" rel="stylesheet">
<link href="css/responsive.css" rel="stylesheet">
<script src="https://use.fontawesome.com/6740b2e08a.js"></script>
<!--[if lt IE 9]>
<script src="js/html5shiv.js"></script>
<script src="js/respond.min.js"></script>
<![endif]-->
<link rel="shortcut icon" href="images/ico/favicon.ico">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="images/ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="images/ico/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="images/ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="images/ico/apple-touch-icon-57-precomposed.png">
</head><!--/head-->
<body>
<header id="header" role="banner">
<div class="main-nav">
<div class="container">
<div class="header-top">
<div class="pull-right social-icons">
<i class="fa fa-facebook"></i>
<i class="fa fa-youtube"></i>
<i class="fa fa-apple"></i>
<i class="fa fa-spotify"></i>
</div>
</div>
<div class="row">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">
<img class="img-responsive" src="images/logo.png" alt="logo">
</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="scroll active">Home</li>
<li class="scroll">Explore</li>
<li class="scroll">Biography</li>
<li class="no-scroll">Sample</li>
<li class="scroll">Contact</li>
</ul>
</div>
</div>
</div>
</div>
</header>
<!--/#header-->
<section id="home">
<div id="main-slider" class="carousel slide" data-ride="carousel">
<!-- <ol class="carousel-indicators">
<li data-target="#main-slider" data-slide-to="0" class="active"></li>
<li data-target="#main-slider" data-slide-to="1"></li>
<li data-target="#main-slider" data-slide-to="2"></li>
</ol> -->
<div class="carousel-inner">
<div class="item active">
<img class="img-responsive" src="images/slider/bg1.jpg" alt="slider">
<!-- <div class="carousel-caption">
<h2>register for our next event </h2>
<h4>full event package only #$199</h4>
GRAB YOUR TICKETS <i class="fa fa-angle-right"></i>
</div> -->
</div>
<!--<div class="item">
<img class="img-responsive" src="images/slider/bg2.jpg" alt="slider">
<div class="carousel-caption">
<h2>register for our next event </h2>
<h4>full event package only #$199</h4>
GRAB YOUR TICKETS <i class="fa fa-angle-right"></i>
</div>
</div>
<div class="item">
<img class="img-responsive" src="images/slider/bg3.jpg" alt="slider">
<div class="carousel-caption">
<h2>register for our next event </h2>
<h4>full event package only #$199</h4>
</i>
</div>
</div>
</div>
</div> -->
</section>
<!--/#home-->
<section id="explore">
<div class="container">
<div class="row">
<div class="watch">
<img class="img-responsive" src="images/watch.png" alt="">
</div>
<div class="col-md-4 col-md-offset-2 col-sm-5">
<h2>Upcoming Show<br>McLeod's Publick House</h2>
</div>
<div class="col-sm-7 col-md-6">
<ul id="countdown">
<li>
<span class="days time-font">00</span>
<p>days </p>
</li>
<li>
<span class="hours time-font">00</span>
<p class="">hours </p>
</li>
<li>
<span class="minutes time-font">00</span>
<p class="">minutes</p>
</li>
<li>
<span class="seconds time-font">00</span>
<p class="">seconds</p>
</li>
</ul>
</div>
</div>
<div class="cart">
<i class="fa fa-map-o"></i> <span>Get Directions</span>
</div>
</div>
</section><!--/#explore-->
<section id="event">
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-9">
<div id="event-carousel" class="carousel slide" data-interval="false">
<h2 class="heading">Explore</h2>
<a class="even-control-left" href="#event-carousel" data-slide="prev"><i class="fa fa-angle-left"></i></a>
<a class="even-control-right" href="#event-carousel" data-slide="next"><i class="fa fa-angle-right"></i></a>
<div class="carousel-inner">
<div class="item active">
<div class="row">
<div class="col-sm-4">
<div class="single-event">
<img class="img-responsive" src="images/melodie-ricky.jpg" alt="Melodie and Ricky Rooker">
<h4>Melodie and Ricky Rooker</h4>
<h5>vocals, lead guitar</h5>
</div>
</div>
<div class="col-sm-4">
<div class="single-event">
<img class="img-responsive" src="images/loudboyz.jpg" alt="Melodie Rooker and the Loud Boyz">
<h4>Melodie Rooker</h4>
<h5>and the Loud Boyz</h5>
</div>
</div>
<div class="col-sm-4">
<div class="single-event">
<img class="img-responsive" src="images/mcleods-family.jpg" alt="We had such a blast playing at McLeod's Publick House in Dothan, AL last night! We got invited to be part of the family, which means our poster got autographed and put up on the wall!">
<h4>McLeod's Publick House</h4>
<h5>We became a part of the "family"</h5>
</div>
</div>
</div>
</div>
<div class="item">
<div class="row">
<div class="col-sm-4">
<div class="single-event">
<img class="img-responsive" src="images/studio.jpg" alt="Melodie at FAME Studios in Muscle Shoals, Alabama">
<h4>FAME Studios</h4>
<h5>Muscle Shoals, AL</h5>
</div>
</div>
<div class="col-sm-4">
<div class="single-event">
<img class="img-responsive" src="images/ricky.jpg" alt="Ricky Rooker at FAME Studios in Muscle Shoals, Alabama">
<h4>FAME Studios</h4>
<h5>Muscle Shoals, AL</h5>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="guitar">
<img class="img-responsive" src="images/guitar.png" alt="guitar">
</div>
</div>
</div>
</section><!--/#event-->
<section id="about">
<div class="guitar2">
<img class="img-responsive" src="images/guitar2.jpg" alt="guitar">
</div>
<div class="about-content">
<h2>Biography</h2>
<p><stron>Melodie Rooker is a singer/songwriter based out of Nashville, TN. She has been singing since the day she was old enough to hold a microphone, and has fronted bands in Missouri, Mississippi, and Tennessee. Her current band, the Loud Boyz, consists of a rhythm/lead guitar (Ricky Rooker), bass (Colton Everhart), and drums (Justin Parker). Melodie Rooker & the Loud Boyz play Country, Blues, & Rock 'n Roll (all the good stuff)! Their shows are extremely high energy and interactive. All in all, this 4-piece band packs a powerful punch!<br><br>Melodie & the Loud Boyz are signed with Old Dog's Records based out of Nashville, TN. They have been interviewed on KTXR FM 101.3 (The Outlaw), and Browne Hill Radio (Africa).<br><br>Melodie Rooker & the Loud Boyz can play up to a 5 hour show, and can tweak their set list to play what the particular crowd wants to hear. They are open to traveling anywhere, and are available now for booking.</strong></p>
</div>
</section><!--/#about-->
<section id="twitter">
<div class="container">
<div class="row">
<div class="col-md-12">
<iframe width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/293251580&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false"></iframe>
</div>
</div>
</div>
</section><!--/#twitter-feed-->
<section id="contact">
<!-- <div id="map">
<div id="gmap-wrap">
<div id="gmap">
</div>
</div>
</div><!--/#map-->
<div class="contact-section">
<div class="ear-piece">
<img class="img-responsive" src="images/ear-piece.png" alt="">
</div>
<div class="container">
<div class="row">
<div class="col-sm-3 col-sm-offset-4">
<div class="contact-text">
<h3>Contact</h3>
<address>
E-mail: melodie#melodierookermusic.com<br>
Phone: (417) 771-9817<br>
</address>
</div>
<div class="contact-address">
<h3>Find me in</h3>
<address>
Nashville, TN
</address>
</div>
</div>
<div class="col-sm-5">
<div id="contact-section">
<h3>Send a message</h3>
<div class="status alert alert-success" style="display: none"></div>
<form id="main-contact-form" class="contact-form" name="contact-form" method="post" action="sendemail.php">
<div class="form-group">
<input type="text" name="name" class="form-control" required="required" placeholder="Name">
</div>
<div class="form-group">
<input type="email" name="email" class="form-control" required="required" placeholder="Email">
</div>
<div class="form-group">
<textarea name="message" id="message" required="required" class="form-control" rows="4" placeholder="Enter your message"></textarea>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary pull-right">Send</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</section>
<!--/#contact-->
<footer id="footer">
<div class="container">
<div class="text-center">
<p> Copyright ©2017 Melodie Rooker All Rights Reserved</p>
</div>
</div>
</footer>
<!--/#footer-->
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script type="text/javascript" src="js/gmaps.js"></script>
<script type="text/javascript" src="js/smoothscroll.js"></script>
<script type="text/javascript" src="js/jquery.parallax.js"></script>
<script type="text/javascript" src="js/coundown-timer.js"></script>
<script type="text/javascript" src="js/jquery.scrollTo.js"></script>
<script type="text/javascript" src="js/jquery.nav.js"></script>
<script type="text/javascript" src="js/main.js"></script>
</body>
</html>
You are using Bootstrap, but you're not taking full advantage of Bootstrap's Grid System and positioning.
You can also check out Bootstrap Examples to find existing HTML structures that you can look at, copy and use.
In your case, the issue is that your .navbar-brand is using a fixed width instead of a responsive width set in percentages. This means that when you scale down the client window to Mobile size, your CSS still say that your .navbar-brand is suppose to be width: 435px;, which gives too little space for the button to appear on the same row.
If you don't want to use the Bootstrap Exampels that I linked to above, or the Bootstrap Grid System taht I also linked to above, you can solve this issue with a CSS Media Query.
For example:
#media(max-width: 767px) {
.navbar-brand {
width: 300px;
}
}
That would change the width of your .navbar-brand to 300px whenever the device has a smaller width than 768px (Usually considered mobile devices). However I suggest that you look at the two first links if you're already using Bootstrap.

Categories