I am trying to arrange my Social icons so that they will be placed on the same level as some text on in the footer. I will provide a Photo of the footer I have so far as well as the html and css code I have made so far. I wanted to figure out if i need to put the social icons into another div so that I can control the position that way, or would i need to utilize position element here?
footer {
background: #212529;
color: white;
width: calc(100% - 80px);
margin-left: 80px;
margin-right: -15px;
}
footer a {
color: #fff;
font-size: 14px;
transition-duration: 0.2s;
}
footer a:hover {
color: #FA944B;
text-decoration: none;
}
.copy {
font-size: 12px;
padding: 10px;
border-top: 1px solid #FFFFFF;
}
.footer-middle {
padding-top: 2em;
color: white;
}
/* Footer social icons */
ul.social-network {
list-style: none;
display: inline;
margin-left: 0 !important;
padding: 0;
}
ul.social-network li {
display: inline;
margin: 0 5px;
}
.social-network a.icoFacebook:hover {
background-color: #3B5998;
}
.social-network a.icoLinkedin:hover {
background-color: #007bb7;
}
.social-network a.icoFacebook:hover i,
.social-network a.icoLinkedin:hover i {
color: #fff;
}
.social-network a.socialIcon:hover,
.socialHoverClass {
color: #44BCDD;
}
.social-circle li a {
display: inline-block;
position: relative;
margin: 0 auto 0 auto;
-moz-border-radius: 50%;
-webkit-border-radius: 50%;
border-radius: 50%;
text-align: center;
width: 30px;
height: 30px;
font-size: 15px;
}
.social-circle li i {
margin: 0;
line-height: 30px;
text-align: center;
}
.social-circle li a:hover i,
.triggeredHover {
-moz-transform: rotate(360deg);
-webkit-transform: rotate(360deg);
-ms--transform: rotate(360deg);
transform: rotate(360deg);
-webkit-transition: all 0.2s;
-moz-transition: all 0.2s;
-o-transition: all 0.2s;
-ms-transition: all 0.2s;
transition: all 0.2s;
}
.social-circle i {
color: #595959;
-webkit-transition: all 0.8s;
-moz-transition: all 0.8s;
-o-transition: all 0.8s;
-ms-transition: all 0.8s;
transition: all 0.8s;
}
.social-network a {
background-color: #F9F9F9;
}
<footer class="mainfooter" role="contentinfo">
<div class="footer-middle">
<div class="container">
<div class="row">
<div class="col-md-3 col-sm-6">
<!--Column1-->
<div class="footer-pad">
<h4>ACTIVITÉS</h4>
<ul class="list-styled">
<li>
Rafting</li>
<li>Kayak</li>
<li>Parachute</li>
<li>Soufflerie</li>
<li>Saut élastique</li>
</ul>
</div>
</div>
<div class="col-md-3 col-sm-6">
<!--Column1-->
<div class="footer-pad">
<h4>INFORMATIONS</h4>
<ul class="list-unstyled">
<li>Mentions légales</li>
<li>À Propos de nous</li>
<li>CGV</li>
<li>CGU</li>
</ul>
</div>
</div>
<div class="col-md-3 col-sm-6">
<!--Column1-->
<div class="footer-pad">
<h4>OFFRES</h4>
<ul class="list-unstyled">
<li>Solo</li>
<li>Groupe</li>
<li>Famille</li>
</ul>
</div>
</div>
<div class="col-md-3 col-sm-6">
<!--Column1-->
<div class="footer-pad">
<h4>PARTENAIRES</h4>
<ul class="list-unstyled">
<li>Nos Partenaires</li>
<li>Devenir Partenaire</li>
</ul>
</div>
</div>
<div class="col-md-3">
<ul class="social-network social-circle">
<li><i class="fa fa-facebook"></i></li>
<li><i class="fa fa-youtube"></i></li>
<li><i class="fa fa-twitter"></i></li>
<li><i class="fa fa-instagram"></i></li>
</ul>
<h4>Suivez-Nous</h4>
</div>
</div>
<div class="row">
<div class="col-md-12 copy">
<p class="text-center">© Copyright 2018 - Company Name. All rights reserved.</p>
</div>
</div>
</div>
</div>
</footer>
Add CSS to <h4>Suivez-Nous</h4> h4{ display:inline }"and change the order
You can add d-flex class to your .col-md-3 element and thus <h4> element and social icons will be in a row.
P.S. I have changed .col-md-3 to .col-md-6, cause in .col-md-3 icons start to wrap onto multiple lines
<div class="col-md-6 d-flex">
<h4>Suivez-Nous</h4>
<ul class="social-network social-circle">
<li><i class="fa fa-facebook"></i></li>
<li><i class="fa fa-youtube"></i></li>
<li><i class="fa fa-twitter"></i></li>
<li><i class="fa fa-instagram"></i></li>
</ul>
</div>
Full code: https://jsfiddle.net/8pL49rs7/
Related
I'm trying to give hover effect to .login-2-submenu a background effect on all li tags but not effecting at all , tried all possible methods. i tried to give ul to class but not worked i also tried to classs in li not worked as well ,
Am I missing something?
here is my html code
<nav>
<ul class="flex">
<li class="px-2"> <input class="searchbox px-2" type="search" name="search"
placeholder="Search for products, brands and more" autocomplete="off"><i class="fa-solid fa-magnifying-glass"></i>
</li>
<li class="btn-li px-2"> <button>Login</button>
<div class="login-submenu">
<div class="login1-1-submenu">
<h4>New Customer?</h4>
<a class="black" href="#">Sign Up</a>
</div>
<div class="login-2-submenu">
<ul>
<l1 class="block px border"><a class="black" href=""><i class="fa-solid fa-user"></i>My
Profile</a></l1>
<l1 class="block px border"><a class="black" href=""><i
class="fa-solid fa-circle-plus"></i>Flipkart Plus Zone</a></l1>
<l1 class="block px border"><a class="black" href=""><i
class="fa-solid fa-bag-shopping"></i>Orders</a></l1>
<l1 class="block px border"><a class="black" href=""><i
class="fa-solid fa-heart"></i>Wishlist</a></l1>
<l1 class="block px border"><a class="black" href=""><i
class="fa-solid fa-circle-dollar-to-slot"></i>Rewards</a></l1>
<l1 class="block px border"><a class="black" href=""><i
class="fa-solid fa-gift"></i>Gift Cards</a></l1>
</ul>
</div>
</div>
</li>
<li class="px-4"> Become a Seller</li>
<li class="px-4 toggle"> More
<div class="sub-menu">
<ul>
<li><i class="fa-solid fa-bell"></i>Notification Preferances</li>
<li><i class="fa-solid fa-question"></i>24/7 Customer Care
</li>
<li><i class="fa-solid fa-arrow-trend-up"></i>Advertise</li>
<li><i class="fa-solid fa-download"></i>Download App</li>
</ul>
</div>
</li>
<li class="px-5"> <i class="fa-solid fa-cart-shopping"></i>Cart</li>
</ul>
</nav>
and css
.sub-menu {
display: block;
position: absolute;
right: 170px;
top: 50px;
background-color: white;
width: 250px;
box-shadow: 0 3px 10px rgb(0 0 0 / 0.2);
}
.sub-menu ul {
text-align: left;
margin: 0;
padding: 0;
}
.sub-menu ul li {
padding: 15.3px 10px;
border-bottom: 1px solid #d0d9d4;
}
.sub-menu .fa-solid {
padding: 0 10px;
color: #2874f0;
}
.sub-menu ul li:hover {
background-color: #ebf2f0;
}
.sub-menu ul li a {
color: black;
}
/* -----------------------------------------------------------------------login-submenu---------------------------------------------- */
.login-submenu {
background-color: white;
position: absolute;
top: 50px;
right: 465px;
box-shadow: 0 3px 10px rgb(0 0 0 / 0.2);
height: 345px;
width: 250px;
}
.login-submenu ul {
padding: 0;
margin: 0;
}
.login-submenu .fa-solid {
padding: 0 10px;
color: #2874f0;
}
.sign {
color: blue !important;
font-size: 15px;
font-weight: 600;
transform: translate(160px, 0);
}
.login-submenu ul li:hover {
background-color: #28cf8c !important;
}
.login1-1-submenu {
display: flex;
border-bottom: 1px solid #d0d9d4;
padding: 15px 10px;
}
.login1-1-submenu h4 {
color: rgba(20, 20, 20, 0.9);
}
.login1-1-submenu a {
padding-left: 50px;
color: blue;
font-weight: 600;
}
.login1-1-submenu:hover {
background-color: #ebf2f0;
}
.login-2-submenu ul li:hover {
background-color: #ebf2f0 !important;
}
I'm tried to give hover effect to login-2-submenu but not working but other hover effect are working.
<l1 class="block px border"> just look this code, you have typed l1 instead of li
all li tags are misspelled in under .login-2-submenu
I have a five list social share button which is click to expend right side, the social icon not visible when expend I need social icon in list left to right after expend the function and when expending social share icon will rotate, I have attached image for reference, please check. Thanks in advance
.social-share-overlay a.overlay-button {
color: #328487;
text-decoration: none;
display: block;
width: 30px;
height: 30px;
line-height: 50px;
border-radius: 5px;
overflow: hidden;
margin: 10px;
transition: all 0.2s ease 0s;
}
.social-share-overlay a.overlay-button i {
padding-right: 10px;
display: block;
}
.social-share-overlay a.overlay-button p {
display: none;
}
.social-share-overlay a.overlay-button:hover {
width: 190px;
opacity: 1;
transition: all 0.2s ease 0s;
}
.social-share-overlay a.overlay-button:hover p {
display: inline;
}
.social-share-overlay a.overlay-button.facebook {
background-color: #ffffff;
border: 1px solid #dfdfdf;
border-radius: 50px;
padding: 9px 10px;
display: flex;
}
.social-share-overlay a.overlay-button.facebook li i {
background-color: #ffffff;
border: 1px solid #dfdfdf;
}
<div class="wrapper-s">
<div class="social-share-overlay">
<a class="overlay-button facebook" href="">
<i class="fa fa-share-alt" aria-hidden="true"></i>
<li><i class="fa fa-facebook-square" aria-hidden="true"></i></li>
<li><i class="fa fa-twitter" aria-hidden="true"></i></li>
<li><i class="fa fa-youtube" aria-hidden="true"></i></li>
<li><i class="fa fa-pinterest-p" aria-hidden="true"></i></li>
<li><i class="fa fa-google-plus" aria-hidden="true"></i></li>
</a>
</div>
</div>
I have some issue with a paragraph moving on hover, after some research I found many issue related with padding and margin so I tried some edit like :
to remove the padding
to remove the margin
to remove line-height
set position static or fixed on hover
Nothing worked, this mostly looks like a layout issue but I'm not very accommodate with it.
Any help would be appreciated.
#main-footer p{
font-size:16px;
}
#main-footer hr{
margin-top:0;
border-color:#19191d;
}
#main-footer .col-sm-4 p{
line-height: 30px;
margin: 0 !important;
}
#main-footer .col-sm-4 p.address{
padding-left: 28px;
}
#main-footer .container a{
color: #ffffff;
}
#main-footer .container a:hover{
color: #d6c087;
position: static;
}
#main-footer .container a:active, a:visited, a:focus{
text-decoration: none;
}
#main-footer img{
width: 24px !important;
height: 24px !important;
}
.social-links {
list-style:none;
margin:0;
padding:0;
margin-bottom:20px;
}
.social-links li{
display:inline-block;
margin:0 5px;
border-radius:3px;
box-shadow:0 4px 0 transparent;
-webkit-transition:all .3s ease-out;
transition:all .3s ease-out;
}
.social-links li a {
display:block;
color:#fff;
color:rgba(255,255,255,0.3);
font-size:18px;
width:40px;
height:40px;
line-height:40px;
text-align:center;
background:rgba(0,0,0,0.2);
border-radius:50%;
-webkit-transition:all .3s ease-out;
transition:all .3s ease-out;
}
.social-links li a:hover {
color:#fff;
background:#38A5DB;
}
<div class="container">
<hr>
<h4>Tittle</h4>
<div class="row">
<div class="col-sm-4">
<a href="" target="_blank"><p><img src="assets/icons8-google-maps-48.png" alt=""> Prettyname
</p>
<p class="address">address<br/>
CP City</p></a>
</div>
<div class="col-sm-4">
<a href="" target="_blank"><p><img src="assets/icons8-google-maps-48.png" alt=""> Prettyname
</p>
<p class="address">address<br/>
CP City</p></a>
</div>
<div class="col-sm-4 text-right">
<ul class="social-links">
<li class="scrollimation fade-right d4"><i class="fa fa-instagram fa-fw"></i></li>
<li class="scrollimation fade-right d3"><i class="fa fa-facebook fa-fw"></i></li>
</ul>
<p>Footer copyright</p>
</div>
</div>
</div>
Adding this should work:
p:hover {
padding-left: 20px;
transition: .5s;
}
p {
transition:.25s;
}
Try it in action in the snippet below.
#main-footer p{
font-size:16px;
}
#main-footer hr{
margin-top:0;
border-color:#19191d;
}
#main-footer .col-sm-4 p{
line-height: 30px;
margin: 0 !important;
}
#main-footer .col-sm-4 p.address{
padding-left: 28px;
}
#main-footer .container a{
color: #ffffff;
}
#main-footer .container a:hover{
color: #d6c087;
position: static;
}
#main-footer .container a:active, a:visited, a:focus{
text-decoration: none;
}
#main-footer img{
width: 24px !important;
height: 24px !important;
}
.social-links {
list-style:none;
margin:0;
padding:0;
margin-bottom:20px;
}
.social-links li{
display:inline-block;
margin:0 5px;
border-radius:3px;
box-shadow:0 4px 0 transparent;
-webkit-transition:all .3s ease-out;
transition:all .3s ease-out;
}
.social-links li a {
display:block;
color:#fff;
color:rgba(255,255,255,0.3);
font-size:18px;
width:40px;
height:40px;
line-height:40px;
text-align:center;
background:rgba(0,0,0,0.2);
border-radius:50%;
-webkit-transition:all .3s ease-out;
transition:all .3s ease-out;
}
.social-links li a:hover {
color:#fff;
background:#38A5DB;
}
p:hover {
padding-left: 20px;
transition: .5s;
}
p {
transition:.25s;
}
<div class="container">
<hr>
<h4>Tittle</h4>
<div class="row">
<div class="col-sm-4">
<a href="" target="_blank"><p><img src="assets/icons8-google-maps-48.png" alt=""> Prettyname
</p>
<p class="address">address<br/>
CP City</p></a>
</div>
<div class="col-sm-4">
<a href="" target="_blank"><p><img src="assets/icons8-google-maps-48.png" alt=""> Prettyname
</p>
<p class="address">address<br/>
CP City</p></a>
</div>
<div class="col-sm-4 text-right">
<ul class="social-links">
<li class="scrollimation fade-right d4"><i class="fa fa-instagram fa-fw"></i></li>
<li class="scrollimation fade-right d3"><i class="fa fa-facebook fa-fw"></i></li>
</ul>
<p>Footer copyright</p>
</div>
</div>
</div>
I've added this:
p:hover {
padding-left: 10px;
transition: 1s;
}
The 1 second transition is just for the example, and also you can come up with better css selector for those paragraphs.
#main-footer p{
font-size:16px;
}
#main-footer hr{
margin-top:0;
border-color:#19191d;
}
#main-footer .col-sm-4 p{
line-height: 30px;
margin: 0 !important;
}
#main-footer .col-sm-4 p.address{
padding-left: 28px;
}
#main-footer .container a{
color: #ffffff;
}
#main-footer .container a:hover{
color: #d6c087;
position: static;
}
#main-footer .container a:active, a:visited, a:focus{
text-decoration: none;
}
#main-footer img{
width: 24px !important;
height: 24px !important;
}
.social-links {
list-style:none;
margin:0;
padding:0;
margin-bottom:20px;
}
.social-links li{
display:inline-block;
margin:0 5px;
border-radius:3px;
box-shadow:0 4px 0 transparent;
-webkit-transition:all .3s ease-out;
transition:all .3s ease-out;
}
.social-links li a {
display:block;
color:#fff;
color:rgba(255,255,255,0.3);
font-size:18px;
width:40px;
height:40px;
line-height:40px;
text-align:center;
background:rgba(0,0,0,0.2);
border-radius:50%;
-webkit-transition:all .3s ease-out;
transition:all .3s ease-out;
}
.social-links li a:hover {
color:#fff;
background:#38A5DB;
}
p:hover {
padding-left: 10px;
transition: 1s;
}
<div class="container">
<hr>
<h4>Tittle</h4>
<div class="row">
<div class="col-sm-4">
<a href="" target="_blank"><p><img src="assets/icons8-google-maps-48.png" alt=""> Prettyname
</p>
<p class="address">address<br/>
CP City</p></a>
</div>
<div class="col-sm-4">
<a href="" target="_blank"><p><img src="assets/icons8-google-maps-48.png" alt=""> Prettyname
</p>
<p class="address">address<br/>
CP City</p></a>
</div>
<div class="col-sm-4 text-right">
<ul class="social-links">
<li class="scrollimation fade-right d4"><i class="fa fa-instagram fa-fw"></i></li>
<li class="scrollimation fade-right d3"><i class="fa fa-facebook fa-fw"></i></li>
</ul>
<p>Footer copyright</p>
</div>
</div>
</div>
Tittle
<div class="row">
<div class="col-sm-4">
<a href="" target="_blank"><img src="assets/icons8-google-maps-48.png" alt=""> Prettyname </img>
<p class="address">address
CP City</p></a>
</div>
<div class="col-sm-4">
<a href="" target="_blank"><img src="assets/icons8-google-maps-48.png" alt=""> Prettyname </img>
<p class="address">address
CP City</p></a>
</div>
<div class="col-sm-4 text-right">
<ul class="social-links">
<li class="scrollimation fade-right d4"><i class="fa fa-instagram fa-fw"></i></li>
<li class="scrollimation fade-right d3"><i class="fa fa-facebook fa-fw"></i></li>
</ul>
<p>Footer copyright</p>
</div>
</div>
</div>
If this solves your problem, plz mark it as your answer.
I'm trying to make some buttons with text positioned below a font awesome icon where both are positioned centrally inside a list item, and I need the anchor element, which also contains the span element for the font awesome icon, to fill the entire size of the list item.
I can fill the list item with the anchor no problem, but I'm having trouble positioning the icon's span above the text in the anchor that contains it.
JSFiddle: https://jsfiddle.net/qod142fz/.
HTML:
<div id="sidebarPrimary">
<ul id="sidebarPrimaryNav">
<li class="navButton"><span class="fa fa-home"></span>Home</li>
<li class="navButton"><span class="fa fa-user"></span>Personal Details</li>
<li class="navButton"><span class="fa fa-briefcase"></span>Company</li>
<li class="navButton"><span class="fa fa-gbp"></span>Invoices</li>
<li class="navButton"><span class="fa fa-address-book"></span>Contacts</li>
<li class="navButton"><span class="fa fa-minus"></span>Expenses</li>
<li class="navButton"><span class="fa fa-list"></span>Payslips</li>
<li class="navButton"><span class="fa fa-cog"></span>Settings</li>
</ul>
</div>
CSS:
/* SIDEBAR PRIMARY */
#sidebarPrimary
{
position: fixed;
width: 15vw;
height: 100%;
top: 0;
left: 0;
background: #2F323E;
}
#sidebarPrimary > ul
{
margin: 0;
padding: 0;
list-style-type: none;
}
#sidebarPrimary > ul > li.navButton
{
width: 100%;
height: 15vw;
}
#sidebarPrimary > ul > li.navButton > a
{
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
color: #687381;
font-size: 12px;
font-weight: 500;
transition: all linear 0.05s;
-webkit-transition: all linear 0.05s;
-moz-transition: all linear 0.05s;
}
#sidebarPrimary > ul > li.navButton > a:hover
{
text-decoration: none;
color: #fff;
background: #E95656;
}
#sidebarPrimary > ul > li.navButton > a > span
{
display: block;
text-align: center;
margin-bottom: 5px;
}
Problem is coming from flex. I recommend wrapping another div around the elements that should be centered inside the a tags
/* SIDEBAR PRIMARY */
#sidebarPrimary {
position: fixed;
width: 15vw;
height: 100%;
top: 0;
left: 0;
background: #2F323E;
}
#sidebarPrimary > ul {
margin: 0;
padding: 0;
list-style-type: none;
}
#sidebarPrimary > ul > li.navButton {
width: 100%;
height: 15vw;
}
#sidebarPrimary > ul > li.navButton > a {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
color: #687381;
font-size: 12px;
font-weight: 500;
text-decoration: none;
transition: all linear 0.05s;
-webkit-transition: all linear 0.05s;
-moz-transition: all linear 0.05s;
}
#sidebarPrimary > ul > li.navButton > a:hover {
text-decoration: none;
color: #fff;
background: #E95656;
}
#sidebarPrimary > ul > li.navButton > a .fa {
display: block;
height: 1em;
margin: 0 auto 5px;
text-align: center;
width: 1em;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<div id="sidebarPrimary">
<ul id="sidebarPrimaryNav">
<li class="navButton"><a href="#">
<div class="navButtonContent">
<span class="fa fa-home"></span>Home
</div>
</a></li>
<li class="navButton"><a href="#">
<div class="navButtonContent">
<span class="fa fa-user"></span>Personal Details
</div>
</a></li>
<li class="navButton"><a href="#">
<div class="navButtonContent">
<span class="fa fa-briefcase"></span>Company
</div>
</a></li>
<li class="navButton"><a href="#">
<div class="navButtonContent">
<span class="fa fa-gbp"></span>Invoices
</div>
</a></li>
<li class="navButton"><a href="#">
<div class="navButtonContent">
<span class="fa fa-address-book"></span>Contacts
</div>
</a></li>
<li class="navButton"><a href="#">
<div class="navButtonContent">
<span class="fa fa-minus"></span>Expenses
</div>
</a></li>
<li class="navButton"><a href="#">
<div class="navButtonContent">
<span class="fa fa-list"></span>Payslips
</div>
</a></li>
<li class="navButton"><a href="#">
<div class="navButtonContent">
<span class="fa fa-cog"></span>Settings
</div>
</a></li>
</ul>
</div>
#sidebarPrimary {
position: fixed;
width: 15vw;
height: 100%;
top: 0;
left: 0;
background: #2F323E;
}
#sidebarPrimary>ul {
margin: 0;
padding: 0;
list-style-type: none;
}
#sidebarPrimary>ul>li.navButton {
width: 100%;
height: 15vw;
}
#sidebarPrimary>ul>li.navButton>a {
position: relative;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
color: #687381;
font-size: 12px;
font-weight: 500;
transition: all linear 0.05s;
-webkit-transition: all linear 0.05s;
-moz-transition: all linear 0.05s;
}
#sidebarPrimary>ul>li.navButton>a:hover {
text-decoration: none;
color: #fff;
background: #E95656;
}
#sidebarPrimary>ul>li.navButton>a>span {
display: block;
text-align: center;
margin-bottom: 5px;
width: 20px;
height: 20px;
background-color: red;
position: absolute;
top: 10px;
}
<div id="sidebarPrimary">
<ul id="sidebarPrimaryNav">
<li class="navButton"><span class="fa fa-home"></span>Home</li>
<li class="navButton"><span class="fa fa-user"></span>Personal Details</li>
<li class="navButton"><span class="fa fa-briefcase"></span>Company</li>
<li class="navButton"><span class="fa fa-gbp"></span>Invoices</li>
<li class="navButton"><span class="fa fa-address-book"></span>Contacts</li>
<li class="navButton"><span class="fa fa-minus"></span>Expenses</li>
<li class="navButton"><span class="fa fa-list"></span>Payslips</li>
<li class="navButton"><span class="fa fa-cog"></span>Settings</li>
</ul>
</div>
Just add position: absolute; top: 40px; to font-awesome icons
I've made my nav and it works fine on desktop fully responsive, but when ever I try to emulate for mobile instead of pushing over the div elements it instead simply shrinks everything. you can see this in action
HTML (inserted via an include statement)
<header id="headers" class="nav-main "> <!-- animated fadeInDown-->
<div class="logo">
<img src="img/logo.png" alt="modren-day-thrones-logo"/>
</div>
<ul>
<li>
Home
</li>
<li>
Chairs
<div class="nav-content">
<div class="nav-sub">
<ul>
<li>
Executive
</li>
<li>
Office
</li>
<li>
Lounge
</li>
</ul>
</div>
</div>
</li>
<li>
About Us
</li>
<?php
if(isset($_SESSION['logged_in'])){ ?>
<li>
Add
</li>
<li>
Log Out
</li>
<?php
}else{ ?>
<li>
Login
</li>
<?php
}
?>
</ul>
</header>
<div class="main-header-mobile-box">
<header class="mobile pushmenu-push">
<nav>
<div class="innerbutton">
<div class="catagoerys">
<!--<div id="cpBtn" class="nav-toggel">-->
<div class="menuebutton group">
<i class="fa fa-bars" id="nav_list"></i>
</div>
</header>
</div>
<body class="pushmenu-push">
<nav class="pushmenu pushmenu-left">
<h3>Menu</h3>
<i class="fa fa-home"></i> Home
<i class="fa fa-folder-open"></i>Chairs
<i class="fa fa-folder"></i> Executive
<i class="fa fa-folder"></i> Office
<i class="fa fa-folder"></i> Lounge
<i class="fa fa-fw fa-list"></i> About Us
<i class="fa fa-sign-in"></i> Login
<?php
if(isset($_SESSION['logged_in'])){ ?>
<i class="fa fa-sign-out"></i> Log Out
<i class="fa fa-plus"></i>Add
<?php
}
?>
<hr>
</nav>
<div class="container">
<div class="main">
<section class="buttonset">
<div id="nav_list">Menu</div>
</section>
end html
body{
text-align:center;
font:1em "Open Sans", sans-serif;
width:70%;
min-width: 349px;
max-width: 1490px;
margin:0 auto;
overflow-x: hidden;
display: block;
}
.pushmenu { /*this is the nav*/
background: #3c3933;
font-family: Arial, Helvetics, sans-serif;
width: 240px;
height: 100%;
top: 0;
z-index: 1000;
position:fixed;
}
.right-login-mobile-nav{
float: right;
display: inline-block;
}
.break-bar{
width:100%;
display: block;
}
.pushmenu h3 {
color: #cbbfad;
font-size: 14px;
font-weight: bold;
padding: 15px 20px;
margin: 0;
background: #282522;
height: 16px;
}
.buttonset{
display: none;
}
.pushmenu a {
display: block; /* drops the nav vertically*/
color: #fff;
font-size: 16px;
font-weight: bold;
text-decoration: none;
border-top: 1px solid #56544e;
border-bottom: 1px solid #312e2a;
padding: 14px;
}
.pushmenu a:hover {
background:#333;
}
.pushmenu a:active {
background: #454f5c;
color: #fff;
}
.pushmenu-left {
left: -240px;
}
.pushmenu-left.pushmenu-open {
left: 0;
}
.pushmenu-push {
overflow-x: hidden;
position: relative;
left: 0;
}
.pushmenu-push-toright {
left: 240px;
}
/*Transition*/
.pushmenu, .pushmenu-push {
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
transition: all 0.3s ease;
}
#nav_list {
background: url(http://www.onlywebpro.com/demo/jquery/icon_nav.png) no-repeat left top;
cursor: pointer;
height: 27px;
width: 33px;
text-indent: -99999em;
}
nav-list.active {
background-position: -33px top;
}
.buttonset {
background: #fff;
height: 16px;
padding: 10px 20px 20px;
}
Mobile specific effects
.mobilebtnmenue{
text-align: left;
margin-top: -22px;
margin-left: 35px;
}
.mobile{
position: relative;
z-index: 50;
background: #222;
font-family: 'Varela Round', sans-serif;
font-size: 17px;
display: block;
}
.pushmenu {
display: block;
}
header{
display:block;
height:100px;
}
body{
width:100%;
min-width: 375px;
}
apparently this code in the header fixes it?
however there seems to be a few hiccups here and there.
<meta name="viewport" content="width=device-width,initial-scale=1.0">