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.
Related
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>
I don't know why my H1 is interfering with navbar in mobile version. When I scroll down my navbar in mobile version, H1 interfering to the navbar and I can't fix this issue. How can I change my code, that it works ?
Image in mobile version is here: https://i.stack.imgur.com/SJ3vi.jpg
Code below:
.banner {
background-image: url('../../../assets/images/natallia-nagorniak-tA3sJ4u09eU-unsplash.jpg');
height: 800px;
background-position: center center;
background-size: 100%;
}
.content {
top: 25%;
left: 5%;
position: absolute;
}
.content h1 {
color: black;
font-size: 3em;
font-weight: bold;
}
.content a {
text-decoration: none;
background-color: var(--primary-color);
color: #fff;
padding: 15px 40px;
border-radius: 5px;
}
.content a:hover {
background-color: #64cff7;
color: #fff;
}
.stepBox {
background-color: #64cff7;
padding: 20px 20px;
border-radius: 5px;
text-align: center;
}
.stepBox h1 {
font-size: 30px;
font-weight: bold;
color: black;
}
.stepBox p {
font-size: 20px;
font-style: italic;
color: #fff;
}
.highlight {
color: var(--primary-color);
font-weight: bold;
font-style: italic;
text-decoration: underline;
}
.cakebox {
padding: 10px 5px;
}
.cakebox img {
width: 100%;
height: 250px;
object-fit: cover;
border-radius: 5px;
}
.cakebox h1 {
font-size: 18px;
margin-top: 20px;
font-weight: bold;
}
.viewmorebtn {
text-decoration: none;
background-color: #64cff7;
color: #fff;
padding: 10px 10px;
border-radius: 5px;
font-size: 18px;
}
.viewmorebtn i {
padding-left: 5px;
}
#media screen and (max-width:600px) {
.banner {
height: 600px;
}
}
<div class="banner">
<div class="content">
<h1 class="mb-5">Čerstvé koláče <br/> priamo k tvojim dverám</h1>
<a routerLink="menu">Objednaj teraz! <i class="bi bi-arrow-right"></i></a>
</div>
</div>
<!-- step -->
<div class="container mt-5 mb-5">
<h1 class="text-center">Ako získať <span class="highlight">čerstvé koláče</span></h1>
<div class="row mt-3">
<!-- one -->
<div class="col-lg-4 mt-2">
<div class="stepBox">
<h1>1</h1>
<p>vyberte koláč</p>
</div>
</div>
<!-- two -->
<div class="col-lg-4 mt-2">
<div class="stepBox">
<h1>2</h1>
<p>vyplnte podrobnosti</p>
</div>
</div>
<!-- three -->
<div class="col-lg-4 mt-2">
<div class="stepBox">
<h1>3</h1>
<p>doručenie vašej objednávky</p>
</div>
</div>
</div>
</div>
<!-- cakebox -->
<div class="container mt-4 mb-4">
<h1 class="text-center">Obľúbené produkty</h1>
<div class="row">
<div class="col-lg-3 mt-3" *ngFor="let ck of cakeData; index as i">
<div class="cakebox" *ngIf="i<=3">
<img src="{{ck.cakeImg}}" />
<h1>{{ck.cakeName}}</h1>
<p>{{ck.cakePrice | currency:'EUR'}}</p>
</div>
</div>
</div>
<a routerLink="menu" class="viewmorebtn">Zobraziť viac<i class="bi bi-arrow-right"></i></a>
</div>
Thank you for your answers!
.content {
top: 25%;
left: 5%;
position: absolute;
}
The container of the h1 is positioned absolutely. The default z-index is causing it to overlap other elements which have a smaller z-index value.
Setting the z-index of the .content div and navbar may help to solve the problem.
.content {
top: 25%;
left: 5%;
position: absolute;
z-index: 10; /** something smaller than the z-index of the navbar **/
}
.navbar {
...
z-index: 20; /** something bigger than the z-index of .content **/
}
I create card using display: table layouting. This is my attempt so far:
.panel-bg {
background-color: #F8F8F8;
height: 100%;
width: 100%;
margin: 0;
padding: 24px 0;
}
.panel {
width: calc(100%-32px);
height: 100%;
border-radius: 3px;
background-color: #fff;
box-shadow: 0px 3px 6px 0 rgba(0,0,0,0.15);
font-size: 16px;
cursor: pointer;
margin: 0 16px;
}
.panel-title-row {
display: table-row;
width: 100%;
border-collapse: collapse;
border-bottom: solid 1px #c4c4c4;
}
.panel-title {
display: table-cell;
width: 80%;
text-transform: uppercase;
font-size: 14px;
font-weight: 700;
color: #0099ff;
padding: 24px;
}
.panel-action {
text-align: right;
width: 20%;
display: table-cell;
}
.panel-action li {
margin-left: 16px;
}
.panel-action li:last-child {
margin-left: 32px;
}
.col-1,
.col-2,
.col-3 {
width: 33.33%;
display: table-cell;
padding: 24px;
}
.panel-data {
margin-top: 16px;
}
.panel-data-label {
font-weight: 700;
font-size: 12px;
}
.panel-data-value {
font-size: 13px;
margin-top: 8px;
}
.panel-content {
display: table-row;
width: 100%;
}
.panel-data-vertical {
display: table;
width: 100%;
}
.panel-data-vertical .panel-data-label,
.panel-data-vertical .panel-data-value {
display: table-cell;
width: 50%;
}
ul {
list-style-type: none;
}
ul li {
display: inline-block;
}
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.11/css/all.css" integrity="sha384-p2jx59pefphTFIpeqCcISO9MdVfIm4pNnsL08A6v5vaQc4owkQqxMV8kg4Yvhaw/" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700,700i" rel="stylesheet">
<div class="panel-bg">
<div class="panel">
<div class="panel-title-row">
<div class="panel-title">
Members
</div>
<ul class="panel-action">
<li><i class="fas fa-pencil-alt"></i></li>
<li><i class="fas fa-trash"></i></li>
<li><i class="fas fa-chevron-down"></i></li>
</ul>
</div>
<div class="panel-content">
<div class="col-1">
<div class="panel-data panel-data-horizontal">
<div class="panel-data-label">
Effective Date
</div>
<div class="panel-data-value">
1 Jan 2018
</div>
</div>
<div class="panel-data panel-data-vertical">
<div class="panel-data-label">
Employment Type
</div>
<div class="panel-data-value">
Permanent
</div>
</div>
<div class="panel-data panel-data-vertical">
<div class="panel-data-label">
Job Level
</div>
<div class="panel-data-value">
Staff
</div>
</div>
<div class="panel-data panel-data-vertical">
<div class="panel-data-label">
Job Title
</div>
<div class="panel-data-value">
All
</div>
</div>
</div>
<div class="col-2">
</div>
<div class="col-3">
</div>
</div>
</div>
</div>
My problems are:
I want to put border-bottom to the panel-title-row but it doesn't show. I want to make the border with the padding (about 24 px) to the left and right but whenever i put padding properties or the border-bottom to the row or its children it seems like doesn't work.
panel-title-row 's children doesn't fill their parent's width to 100% eventhough I set 80% and 20% to each child. When I change the percentage, it affect the col-1 that doesn't belong to the row.
I create another table-row below the panel-title (named panel-content) and I want to divide it to 3 columns with the same width (named col-1, col-2, and col-3) but the width: 33.33% doesn't work.
This is what I want to achieve, with emphasis on the space between the card and the line.
Any help appreciated!
Hope this may help you, do you want it to be done only using table?
.panel-bg {
background-color: #F8F8F8;
height: 100%;
width: 100%;
margin: 0;
padding: 24px 0;
}
.panel {
width: calc(100%-32px);
height: 100%;
border-radius: 3px;
background-color: #fff;
box-shadow: 0px 3px 6px 0 rgba(0,0,0,0.15);
font-size: 16px;
cursor: pointer;
margin: 0 16px;
padding:25px;
}
.panel-title-row {
display: block;
width: 100%;
border-collapse: collapse;
border-bottom: solid 1px #c4c4c4;
}
.panel-title {
display: inline-block;
width: 78%;
text-transform: uppercase;
font-size: 14px;
font-weight: 700;
color: #0099ff;
padding: 0;
}
.panel-action {
text-align: right;
width: 20%;
display: inline-block;
padding:0px 5px 15px 0;
margin:0;
}
.panel-action li {
margin-left: 10px;
}
.panel-action li:last-child {
margin-left: 29px;
}
.col-1,
.col-2,
.col-3 {
width: 33.33%;
display: table-cell;
padding: 5px 0px 20px 0px;
}
.panel-data {
margin-top: 16px;
}
.panel-data-label {
font-weight: 700;
font-size: 12px;
}
.panel-data-value {
font-size: 13px;
margin-top: 8px;
}
.panel-content {
display: table-row;
width: 100%;
}
.panel-data-vertical {
display: table;
width: 100%;
}
.panel-data-vertical .panel-data-label,
.panel-data-vertical .panel-data-value {
display: table-cell;
width: 50%;
}
ul {
list-style-type: none;
}
ul li {
display: inline-block;
}
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.11/css/all.css" integrity="sha384-p2jx59pefphTFIpeqCcISO9MdVfIm4pNnsL08A6v5vaQc4owkQqxMV8kg4Yvhaw/" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700,700i" rel="stylesheet">
<div class="panel-bg">
<div class="panel">
<div class="panel-title-row">
<div class="panel-title">
Members
</div>
<ul class="panel-action">
<li><i class="fas fa-pencil-alt"></i></li>
<li><i class="fas fa-trash"></i></li>
<li><i class="fas fa-chevron-down"></i></li>
</ul>
</div>
<div class="panel-content">
<div class="col-1">
<div class="panel-data panel-data-horizontal">
<div class="panel-data-label">
Effective Date
</div>
<div class="panel-data-value">
1 Jan 2018
</div>
</div>
<div class="panel-data panel-data-vertical">
<div class="panel-data-label">
Employment Type
</div>
<div class="panel-data-value">
Permanent
</div>
</div>
<div class="panel-data panel-data-vertical">
<div class="panel-data-label">
Job Level
</div>
<div class="panel-data-value">
Staff
</div>
</div>
<div class="panel-data panel-data-vertical">
<div class="panel-data-label">
Job Title
</div>
<div class="panel-data-value">
All
</div>
</div>
</div>
<div class="col-2">
</div>
<div class="col-3">
</div>
</div>
</div>
</div>
I'm struggling with the frontend of my page,
When there is a need for content to scroll I am attempting to keep the sidebar, navbar and title bar in the same place whilst allowing the content to scroll.
I thought I had this working until I added a panel to my page which is now causing an overlap. I've deliberately made my textarea massive below to show this.
I can't directly post images yet so heres a link (Edit now I can):
As you can see I'm also struggling to get my panels content to stretch the width of the panel
JSFiddle: https://jsfiddle.net/duwew6ke/
My css file:
.body-content {
padding-left: 15px;
padding-right: 15px;
padding-top: 200px;
}
body {
font-family: "Helvetica Neue",Roboto,Arial,"Droid Sans",sans-serif;
}
.dl-horizontal dt {
white-space: normal;
}
input,
select,
textarea {
max-width: 280px;
}
#sidebar {
position: fixed;
left: 0;
width: 230px;
height: 100%;
border-right: 0.1px solid rgb(225, 225, 225);
margin-top: 60px;
}
#sidebar .sidebar-brand {
height: 50px;
width: 230px;
font-weight: bold;
padding-top:10px;
display: block;
margin: 0;
border-bottom: 0.1px solid rgb(225, 225, 225);
background-color: #fafafa;
font: 500 20px Roboto,RobotoDraft,Helvetica,Arial,sans-serif;
}
#sidebar .sidebar-brand .search {
display: block;
}
#sidebar .sidebar-brand h2 {
margin: 0;
padding-left: 10px;
padding-top: 10px;
}
#navbarwrapper .navbar-inverse {
background-color: white;
border-bottom: 0.1px solid rgb(225, 225, 225);
font-family: 'Indie Flower', cursive;
height: 60px;
position: fixed;
width: 100%;
}
#navbarwrapper .navbar-brand {
font-size: 2em;
margin-top: 10px;
color: #1976d2;
}
#navbarwrapper .userpicture {
height: 50px;
width: 50px;
}
#navbarwrapper .username {
display: block;
margin-top: 30px;
font-size: 20px;
}
#navbarwrapper .bell {
margin-right: 20px;
}
#navbarwrapper .envelope {
margin-right: 20px;
}
#titlenavwrapper {
margin-left: 230px;
margin-top: 60px;
position: fixed;
width: 100%;
}
#titlenavwrapper .navbar-inverse {
height: 50px;
background-color: #1976d2;
font-size: 25px;
color: whitesmoke;
padding-left: 10px;
padding-top: 7px;
}
.body-content {
margin: 0;
margin-left: 230px;
top: 110px;
background-color: #fafafa;
height: 100%;
}
.body-content h2 {
margin: 0;
}
html, body {
height: 100%;
}
The panel code:
<div class="row">
<div class="col-sm-6 col-sm-offset-3">
<div class="panel">
<div class="panel panel-heading">
<i class="fa fa-telegram"></i> Contact Us!
</div>
<div class="panel panel-body">
<form id="contactform" method="post">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group Name">
<label>Name</label>
<input class="form-control" />
</div>
Layout Code:
<div id="sidebar">
<div class="sidebar-brand">
<span class="text-muted text-center"><i class="fa fa-search"></i>Search...</span>
</div>
</div>
<div id="navbarwrapper">
<nav class="nav navbar-inverse navbar-static-top">
<div class="navbar-brand">
Title
</div>
<div class="navbar profile-area">
<img src="~/Content/img/default.jpg" class="userpicture img-circle pull-right" alt="userpicture"/>
<span class="username pull-right"><i class="bell fa fa-bell"></i><i class="envelope fa fa-envelope"></i> Name</span>
</div>
</nav>
</div>
<div id="titlenavwrapper">
<nav class="nav navbar-inverse navbar-static-top">
<div class="navbar-title">
#ViewBag.Title
</div>
</nav>
</div>
You need to add a z-index to #titlenavwrapper
#titlenavwrapper{
z-index:5;
}
click here for demo
I have a mega menu which is vertically above a div that contains image banners. When hovering over this mega menu it expands displaying content. When expanding the content goes under the images in the image banner div making them not visible. I want it to be on top of the image banner div when I hover over mega menu links.
* {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 0; margin: 0;
}
body {
}
.wrapperss {
font-size: 1.6em;
padding: 2em;
margin: 0 auto;
width: 95%;
background-color: white;
z-index: 999;
}
/* Navigation Bar Styling */
.navSuper {
background: white;
width: 100%;
height: 43px;
position: relative;
border: 1px solid #B2BEB5;
}
.navSuper li {
list-style: none;
float: left;
text-align: center;
width: 33%;
width: calc(100% / 3);
}
.navSuper > li > a {
color: #536267;
font-weight: bold;
font-size: .7em;
text-decoration: none;
line-height: 43px;
padding: 0 20px;
height: 43px;
text-transform: uppercase;
}
.navSuper > li:hover {
border-right: 1px solid #b2beb5;
border-left: 1px solid #b2beb5;
}
.navSuper > li:hover > div {
display: block;
}
.navSuper > li > div {
position: absolute;
left: 0;
top: 41px;
display: none;
background-color: white;
padding: 10px 10px;
box-shadow: 2px 4px 4px rgba(0,0,0,0.4);
overflow: hidden;
}
.nav-mainCustom{
width: 100%;
border: 1px solid #b2beb5;
}
.nav-dividerCustom {
display: inline-block;
width: 1.8%;
}
.nav-focus-artCustom {
display: inline-block;
width: 11.5%;
vertical-align: top;
text-align: center;
}
.nav-art-authorCustom, .nav-art-titleCustom{
display: inline-block;
padding: 10px 0px;
}
.nav-art-authorCustom {
font-size: .9em;
color: red;
}
.nav-art-titleCustom {
font-size: 1.4em;
}
.nav-art-imageCustom {
display: inline-block;
}
.nav-divider-2Custom {
display:inline-block;
width: 3.8%;
}
.nav-headlinesCustom {
display:inline-block;
width: 34.5%;
font-size: 1.2em;
font-weight: bold;
text-align: left;
padding-right: 3px;
}
.nav-headline-linkCustom {
border-bottom: 1px solid #b2beb5;
padding: 10px 0px;
}
.nav-headline-linkCustom:last-child {
border-width: 0px;
}
.nav-linksCustom{
display: inline-block;
width: 11.95%;
vertical-align: top;
text-align: left;
}
.nav-linkCustom{
/*padding-bottom: 20px; */
}
.nav-empty-cellCustom{
}
.nav-headline-linkCustom:first-child{
color: red;
}
.nav-linkCustom:first-child{
color: red;
}
<div class="wrapperss">
<ul class="navSuper">
<li>Title 1
<div class="nav-mainCustom">
<div class="nav-divider"></div>
<div class="nav-focus-artCustom">
<img class="nav-art-imageCustom" src="http://example image" alt="article image"/>
<span class="nav-art-authorCustom">Title 2</span> <br>
<span class="nav-art-titleCustom">Product 1</span>
</div>
<div class="nav-divider-2Custom"></div>
<div class="nav-focus-artCustom">
<img class="nav-art-imageCustom" src="http://exampleimage" alt="article image"/>
<span class="nav-art-authorCustom">Title 3</span><br>
<span class="nav-art-titleCustom">Product 2</span>
</div>
<div class="nav-divider-2Custom"></div>
<div class="nav-headlinesCustom">
<div class="nav-headline-linkCustom">New Products</div>
<div class="nav-headline-linkCustom">Product 1 Desctiption</div>
<div class="nav-headline-linkCustom">Product 2 Desctiption</div>
<div class="nav-headline-linkCustom">Product 3 Desctiption</div>
<div class="nav-headline-linkCustom">Product 4 Desctiption</div>
<div class="nav-headline-linkCustom">Product 5 Desctiption</div>
</div>
<div class="nav-divider-2Custom"></div>
<div class="nav-linksCustom">
<div class="nav-linkCustom">Categories</div>
<div class="nav-linkCustom">CAt 1</div>
<div class="nav-linkCustom">Cat 2</div>
<div class="nav-linkCustom">Cat 3</div>
<div class="nav-linkCustom">Cat 4</div>
</div>
<div class="nav-linksCustom">
<div class="nav-empty-cellCustom"></div>
<div class="nav-linkCustom">Test 1</div>
<div class="nav-linkCustom">Cat 5</div>
<div class="nav-linkCustom">Cat 6</div>
<div class="nav-linkCustom">Cat 7</div>
<div class="nav-linkCustom">Cat 8</div>
</div>
In .navSuper class use
z-index: 99;