I have moved my icon-header from below the mainHeader to above it. It was fine before, but I like it the icon-header above the mainHeader, but the links in my nav are below my mainHeader. I have attempted to use padding, margin and just top, but it stays put. Here is my JSFiddle. My JSFiddle is slightly different to my actual HTML and CSS, as I have all my files in a folder in my home directory. Here is my HTML and CSS:
HTML
<!--HEADER OF WEBSITE-->
<!--Icon Header-->
<div class="bottomHeader">
<div id="icon-navwrap">
<ul id="icon-nav">
<li id="fb"><img src="Header/facebook.png" width="30px" height="30px"/></li>
<li><div id="mini-divider"></div></li>
<li id="yt"><img src="Header/youtube.png" width="30px" height="30px"/></li>
<li><div id="mini-divider"></div></li>
<li id="tt"><img src="Header/twitter.png" width="30px" height="30px"/></li>
<li><div id="mini-divider"></div></li>
</ul>
</div>
</div>
<!--End of Icon Header-->
<!--Main Header-->
<div class="mH-clearfix">
<!--Main Header Logo-->
<div id="mainHeader">
<div id="header_logo">
<div id="logo"><img src="Header/banner.png" alt="Logo" width="300"height="100">
</div>
<!--End of Logo-->
<!--Main Header Links-->
<div id="nav-wrap">
<ul id="nav">
<li>Roster</li>
<li>Gallery</li>
<li>Sponsors</li>
<li>About Us</li>
</ul>
</div>
<!--End of Main Header Links-->
</div>
</div>
</div>
<!--End of Main Header-->
</div>
CSS
/*=================
======= Body ======
=================*/
* {
margin: 0; padding: 0;
}
body {
font-family: "Montserrat";
font-size: 115%;
background-image: url(background.png)
}
/*=======================
====== Header Logo ======
=======================*/
#mainHeader {
background-color: #02236a;
}
.mH-clearfix {
height: auto;
width: 100%;
content: "";
clear: both;
}
#nav {
margin-left: 25%;
}
/*==========================
======= Icon Header ========
==========================*/
.bottomHeader {
background: #000b22;
width: 100%;
height: 30px;
margin: 0 auto;
position: absolute;
margin: 0;
overflow: hidden;
}
#icon-nav li {
float: left;
background-size: 50%;
transition: background-color 0.5s ease;
}
#mini-divider {
position: absolute;
top: 1%;
bottom: 1%;
border-left: 1px solid white;
}
#fb:hover {
background-color: #3f5c9a;
}
#yt:hover {
background-color: #bd2826;
}
#tt:hover {
background-color: #3f8dcb;
}
/*===============
====== Nav ======
===============*/
#nav {
list-style: none;
}
#nav a {
position: relative;
color: #fff;
text-decoration: none;
}
#nav li {
float: left;
margin-left: 50px;
border-radius: 5px;
line-height: 100px;
}
#nav a:hover {
color: #fff;
}
#nav a:before {
content: "";
position: absolute;
width: 100%;
height: 2px;
bottom: 0;
left: 0;
background-color: #fff;
visibility: hidden;
-webkit-transform: scaleX(0);
transform: scaleX(0);
-webkit-transition: akk 0.3s ease-in-out 0s;
transition: all 0.3s ease-in-out 0s
}
#nav a:hover:before {
visibility: visible;
-webkit-transform: scaleX(1);
transform: scaleX(1);
}
/*============================
======= Miscellaneous ========
============================*/
a {
text-decoration: none;
}
li {
list-style: none;
}
Okay to fix your styling issues:
Add margin-top: 30px; and display: inline-block; to #logo
Add display: inline-block; to #nav-wrap
Remove margin-left: 25%; from #nav
This should fix the header.
Related
I have created a landing page which has a black background for the navbar and has text in white color but I want to have a white background for the navbar with its text in black for the rest of the pages in a website.
Can anyone suggest how I can change the color for the remaining pages?
I've read that jQuery can help out in such a case but I have no experience with jQuery.
HTML:
<div class="wrapper">
<header>
<nav>
<div class="menu-icon">
<i class="fa fa-bars fa-2x"></i>
</div>
<div class="menu">
<ul>
<li>Page 1</li>
<li>Page 2</li>
<li>Page 3</li>
</ul>
</div>
</nav>
</header>
</div>
CSS:
nav {
position: fixed;
width: 100%;
line-height: 60px;
animation: left-in 0.5s ease-in forwards;
animation-delay: 0%;
opacity: 0;
}
nav ul {
line-height: 15px;
list-style: none;
background: black;
overflow: hidden;
color: #fff;
padding: 0;
text-align: right;
margin: 0;
padding-right: 40px;
transition: 1s;
}
nav.black ul {
background: white
}
nav ul li {
display: inline-block;
padding: 16px 20px;;
}
nav ul li a {
text-decoration: none;
color: white;
font-size: 16px;
font-family: 'Roboto Slab', serif;
}
a:hover {
color: orange;
}
.menu-icon {
line-height: 30px;
width: 100%;
background: black;
text-align: right;
box-sizing: border-box;
padding: 15px 24px;
cursor: pointer;
color: #fff;
display: none;
}
#keyframes fade-in
{
from
{
opacity: 0;
}
to
{
opacity: 1;
}
}
#keyframes left-in
{
from
{
transform: translateX(-200px);
opacity: 0;
}
to
{
transform: translateX(0px);
opacity: 1;
}
}
Yes. You can use the CSS stylesheet that you are using (CSS in the HTML code); and for that specific page (landing page) you only have to inline it in the HTML element and it will override the CSS.
Like this:
CSS code for all pages
.nav {background:white;color:#000000;}
inline CSS code only on the landing page
<nav style="background:black;color:#FFFFFF;">
I for sure don't recommend the previous two answers as it is not preferrable to make two css files, and for sure in the SEO point of view inlining the style is not recommended
I suggest you add a class to the BODY tag that is only added for inside pages change your code to something like this:
<style>
nav {
position: fixed;
width: 100%;
line-height: 60px;
animation: left-in 0.5s ease-in forwards;
animation-delay: 0%;
opacity: 0;
}
nav ul {
line-height: 15px;
list-style: none;
background: black;
overflow: hidden;
color: #fff;
padding: 0;
text-align: right;
margin: 0;
padding-right: 40px;
transition: 1s;
}
.inside nav ul {
color: #000000;
background: #fff;
}
nav ul li {
display: inline-block;
padding: 16px 20px;;
}
nav ul li a {
text-decoration: none;
color: white;
font-size: 16px;
font-family: 'Roboto Slab', serif;
}
a:hover {
color: orange;
}
.menu-icon {
line-height: 30px;
width: 100%;
background: black;
text-align: right;
box-sizing: border-box;
padding: 15px 24px;
cursor: pointer;
color: #fff;
display: none;
}
#keyframes fade-in {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
#keyframes left-in {
from {
transform: translateX(-200px);
opacity: 0;
}
to {
transform: translateX(0px);
opacity: 1;
}
}
</style>
<body class="inside"> <!-- or replace it with (home) for your homepage or no class needed for homepage -->
<div class="wrapper">
<header>
<nav>
<div class="menu-icon">
<i class="fa fa-bars fa-2x"></i>
</div>
<div class="menu">
<ul>
<li>About Me</li>
<li>Projects</li>
<li>Publications</li>
</ul>
</div>
</nav>
</header>
</div>
</body>
Hi guys I'm new to programming and I'm trying to build a site. I wanted a nice animation for my nabber and followed this guide (http://tobiasahlin.com/blog/css-trick-animating-link-underlines/),I want an animation in which the text gets underlined when you hover over it, but it doesn't work, why not? Did I write everything properly in the right places etc. and is it right to write you CSS in the head because I saw someone who had a separate file for the CSS code.
<head>
<style>
body{
background-color: rgb(57, 57, 57);
}
header{
background-color: white;
}
header::after{
content: " ";
display: table;
clear: both;
}
.container{
width: 95%;
margin: 0 auto;
}
.logo{
float: left;
width: 250px;
height: auto;
margin-top: 10px;
margin-bottom: 10px;
}
nav{
float: right;
font-family: 'courier';
font-size: 18px;
font-weight: 300;
letter-spacing: 0.5px;
}
nav ul{
margin: 0;
padding: 0;
list-style: none;
overflow: hidden;
}
nav li{
display: inline-block;
margin-left: 45px;
}
nav li a{
display: block;
color: black;
text-decoration: none;
padding: 17px 15px;
}
nav li a:before{
content: '';
position: absolute;
width: 100%;
bottom: 0;
left: 0;
background-color: #000;
visibility: hidden;
-webkit-transform: scaleX(0);
transform: scaleX(0);
-webkit-transition: all 0,3s ease-in-out 0s;
transition: all 0,3s ease-in-out 0s;
}
nav li a:hover:before{
visibility: visible;
-webkit-transform: scaleX(1);
transform: scaleX(1);
}
</style>
</head>
<!DOCTYPE html>
<html>
<body>
<header>
<div class="container">
<img class="logo" src="file:///Users/siebe/PROJECTEN/Code/HTML/Site%20DIA/Pics/Logo%20DIA%20site.png">
<nav>
<ul>
<li>PROJECTEN</li>
<li>OVER</li>
<li>CONTACT</li>
</ul>
</nav>
</div>
</body>
</html>
Here is your error:
transition: all 0,3s ease-in-out 0s;
You have a comma (,) instead of a period (.)
In future, try this handy CSS validation service, it will point out errors for you!
CSS Validation
3 things.
1. You had an error here:
-webkit-transition: all 0,3s ease-in-out 0s;
transition: all 0,3s ease-in-out 0s;
2. "nav li a" need to have a "relative" position.
3. You did not set a height for "nav li a:before"
This works..
<head>
<style>
body{
background-color: rgb(57, 57, 57);
}
header{
background-color: white;
}
header::after{
content: " ";
display: table;
clear: both;
}
.container{
width: 95%;
margin: 0 auto;
}
.logo{
float: left;
width: 250px;
height: auto;
margin-top: 10px;
margin-bottom: 10px;
}
nav{
float: right;
font-family: 'courier';
font-size: 18px;
font-weight: 300;
letter-spacing: 0.5px;
}
nav ul{
margin: 0;
padding: 0;
list-style: none;
overflow: hidden;
}
nav li{
display: inline-block;
margin-left: 45px;
}
nav li a{
display: block;
color: black;
text-decoration: none;
padding: 17px 15px;
position: relative;
}
nav li a:before{
content: '';
position: absolute;
width: 100%;
height: 3px;
bottom: 0;
left: 0;
background-color: black;
visibility: hidden;
-webkit-transform: scaleX(0);
transform: scaleX(0);
-webkit-transition: all 0.3s ease-in-out 0s;
transition: all 0.3s ease-in-out 0s;
}
nav li a:hover:before{
visibility: visible;
-webkit-transform: scaleX(1);
transform: scaleX(1);
}
</style>
</head>
<!DOCTYPE html>
<html>
<body>
<header>
<div class="container">
<img class="logo" src="file:///Users/siebe/PROJECTEN/Code/HTML/Site%20DIA/Pics/Logo%20DIA%20site.png">
<nav>
<ul>
<li>PROJECTEN</li>
<li>OVER</li>
<li>CONTACT</li>
</ul>
</nav>
</div>
</body>
</html>
In your css code try changing nav li a to nav ul li a where ever you have in the style tag. That way your <a> tag can get the proper style.
nav li a would refer to a link in a list item in a navbar
nav ul li a would refer to a link in a list item in a list in a navbar
body{
background-color: rgb(57, 57, 57);
}
header{
background-color: white;
}
header::after{
content: " ";
display: table;
clear: both;
}
.container{
width: 95%;
margin: 0 auto;
}
.logo{
float: left;
width: 250px;
height: auto;
margin-top: 10px;
margin-bottom: 10px;
}
nav{
float: right;
font-family: 'courier';
font-size: 18px;
font-weight: 300;
letter-spacing: 0.5px;
}
nav ul{
margin: 0;
padding: 0;
list-style: none;
overflow: hidden;
}
nav li{
display: inline-block;
margin-left: 45px;
}
nav li a{
display: block;
color: black;
text-decoration: none;
padding: 17px 15px;
}
nav li a:after{
display:block;
content: '';
border-bottom: solid 3px #019fb6;
transform: scaleX(0);
transition: transform 250ms ease-in-out;
}
nav li a:hover:after{
transform: scaleX(1);
}
<header>
<div class="container">
<img class="logo" src="file:///Users/siebe/PROJECTEN/Code/HTML/Site%20DIA/Pics/Logo%20DIA%20site.png">
<nav>
<ul>
<li>PROJECTEN</li>
<li>OVER</li>
<li>CONTACT</li>
</ul>
</nav>
</div>
</header>
We can achieve by using border-bottom and transform css properties.
When I have this picture in it only goes a certain amount of height and it wont go past. If you make it smaller it will become smaller, but if you make it bugger it wont be bigger then 50px.
Code:
Hmtl
<body>
<div class="header-img">
<div id="wrapper">
<!-- Sidebar -->
<div id="sidebar-wrapper">
<ul class="sidebar-nav">
<li class="sidebar-brand">
<a href="#">
Rx Programming
</a>
</li>
<li>
Calender
</li>
<li>
Achievements
</li>
<li>
Trainer
</li>
<li>
Social
</li>
<li>
Account
</li>
<li>
Contact
</li>
<li>
Sign Out
</li>
</ul>
</div>
<!-- /#sidebar-wrapper -->
<!-- Page Content -->
<div id="page-content-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
Menu
</div>
</div>
</div>
</div>
<!-- /#page-content-wrapper -->
</div>
</div>
<!-- /#wrapper -->
<!-- jQuery -->
<script src="js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
<!-- Menu Toggle Script -->
<script>
$("#menu-toggle").click(function(e) {
e.preventDefault();
$("#wrapper").toggleClass("toggled");
});
</script>
CSS:
.btn .btn-default .btn-right {
padding: 20px;
color: red !important;
float: left;
}
.header-img {
background-image: url(../img/crossfitheader.jpg);
background-position: center;
background-repeat: no-repeat;
background-color: #222;
height: 100%
}
#wrapper {
padding-left: 0;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;
}
#wrapper.toggled {
padding-left: 250px;
}
#sidebar-wrapper {
z-index: 1000;
position: fixed;
left: 250px;
width: 0;
height: 100%;
margin-left: -250px;
overflow-y: auto;
background: #000;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;
}
#wrapper.toggled #sidebar-wrapper {
width: 250px;
}
#page-content-wrapper {
width: 100%;
position: absolute;
padding: 15px;
}
#wrapper.toggled #page-content-wrapper {
position: absolute;
margin-right: -250px;
}
/* Sidebar Styles */
.sidebar-nav {
position: absolute;
top: 0;
width: 250px;
margin: 0;
padding: 0;
list-style: none;
}
.sidebar-nav li {
text-indent: 20px;
line-height: 40px;
}
.sidebar-nav li a {
display: block;
text-decoration: none;
color: #999999;
}
.sidebar-nav li a:hover {
text-decoration: none;
color: #fff;
background: rgba(255,255,255,0.2);
}
.sidebar-nav li a:active,
.sidebar-nav li a:focus {
text-decoration: none;
}
.sidebar-nav > .sidebar-brand {
height: 65px;
font-size: 18px;
line-height: 60px;
}
.sidebar-nav > .sidebar-brand a {
color: #999999;
}
.sidebar-nav > .sidebar-brand a:hover {
color: #fff;
background: none;
}
#media(min-width:768px) {
#wrapper {
padding-left: 250px;
}
#wrapper.toggled {
padding-left: 0;
}
#sidebar-wrapper {
width: 250px;
}
#wrapper.toggled #sidebar-wrapper {
width: 0;
}
#page-content-wrapper {
padding: 20px;
position: relative;
}
#wrapper.toggled #page-content-wrapper {
position: relative;
margin-right: 0;
}
}
.btn .btn-default .btn-right {
padding: 20px;
color: red !important;
}
#menu-toggle {
padding: 20px;
color: red !important;
}
Your question is very unclear and I'm not exactly sure what you're asking, though I'm assuming you're trying to enlarge an image if the window size is expanded or decreased?
Simple line in your stylesheet can fix this (IF this is what you're asking..)
img{max-width:100%;height:auto;}
All it dose is set the height of the image automatically and give it a responsive quality.
I am working on an site where I made an fixed footer which I never did before. I got the basic code from this tutorial: http://tutorialzine.com/2013/08/slideout-footer-css/ the links work in there but as my site also got an Fixed header It messes up a bit. The links arent hoverable or clickable. How can I make my links clickable It is not that they worked when I even copyd the code in to check if the links would work then they didnt either.
Header:
<header>
<nav>
<div class="FSG-box">
<img id="FSG-logo" src="imgs/FSG.png"/>
</div>
<ul class="menu">
<li><strong>Home</strong></li>
<li>partners</li>
<li>education</li>
<li>about</li>
<li>contact</li>
</ul>
</nav>
<section id="intro">
<div class="transparent">
</div>
<div class="boxhome">
<h1>Welcome at the Food Safety Group</h1>
<div class="line1"></div>
<div class="line2"></div>
<div class="line3"></div>
</div>
</section>
</header>
Header CSS:
section {
overflow: hidden; height: 900px;
}
nav{
width: 100%;
height: 100px;
background-color: #f4f4f4;
left: 0;
top: 0;
position: fixed;
z-index: 10000;
}
.menu{
float: right;
position: relative;
right: 100px;
top:15px;
}
.menu li:hover
{
-webkit-transform:scale(1.3);
transform:scale(1.3);
}
.menu li{
color: #000;
font-weight: 300;
list-style: none;
text-decoration: none;
float: left;
margin-left: 25px;
font-size: 18px;
-webkit-transition: all 0.7s ease;
transition: all 0.7s ease;
}
#FSG-logo{
position: absolute;
top:13px;
left:13px;
max-width:450px;
}
.transparent {
position: absolute;
background-color: #000;
opacity: 0.625;
filter: alpha(opacity=60); /* For IE8 and earlier */
width: 100%;
height: 100%;
}
.boxhome:hover{
-webkit-transform:scale(1.05);
transform:scale(1.05);
height: 100%;
}
.boxhome {
width:100%;
margin:0 auto;
-webkit-transition: all 0.7s ease;
transition: all 0.7s ease;
}
#intro {
z-index: 10;
/* sets it above .slide1 */
/* this pushes it below .slide1 in the scroll */
min-height:1100px;
max-height: 1200px;
position: absolute;
width: 100%;
left: 0;
top:0;
background: url(../imgs/kassen.jpg);
}
#intro h1 {
font-size: 36pt;
text-align:center;
position: relative;
font-weight: 400;
top:320px;
}
Footer + Div above HTML:
<article class="result">
<div class="transparent2">
</div>
<div class="power">
<h2>The result of a well organized group</h2>
<h3>The six partners in this group can supply all automation required to produce a plant, harvest the product and supply the product safe and sound to the supermarket.</h3>
</div>
</article>
<footer>
<ul>
<li>
<p class="home">Where to Find Us</p>
<ul>
<li>Visser Horti Systems</li>
<li>Postoffice box 5103</li>
<li>3295 ZG 's-Gravendeel</li>
<li>The Netherlands</li>
</ul>
</li>
<li>
<p class="services">Sign up for our News Letter</p>
<ul>
<li>3D modeling</li>
<li>Web development</li>
<li>Mobile development</li>
<li>Web & Print Design</li>
</ul>
</li>
<li>
<p class="reachus">Reach us</p>
<ul>
<li><a style="cursor: pointer;" href="http://www.google.com/maps/ms?ie=UTF8&hl=nl&msa=0&msid=117943608112586518975.00000111c1da021ca60eb&om=1&t=h&z=17&ll=51.787568" target="_blank">Google Maps</a></li>
<li>Phone: +31 (0) 78 673 9800</li>
<li>Fax: +31 (0) 78 673 3434</li>
<li>info#visser.eu</li>
</ul>
</li>
</ul>
</footer>
Footer CSS:
.result {
min-height: 750px;
width: 100%;
left: 0px;
position: absolute;
background: url('../imgs/result.jpg') no-repeat scroll center center transparent;
top: 2830px;
z-index:1;
}
footer{
height:400px;
width: 100%;
position: relative;
z-index:-2;
background-color: #303030;
}
footer > ul{
width:50%;
position:fixed;
left:50%;
bottom:0;
margin-left:-480px;
padding-bottom: 200px;
z-index:-1;
}
footer > ul > li{
width:33.3%;
float:left;
}
footer ul{
list-style: none;
}
/* The links */
footer > ul > li ul li{
text-transform: uppercase;
font-weight:bold;
line-height:1.8;
}
footer > ul > li ul li a{
text-decoration: none !important;
color: #fff !important;
}
footer > ul > li ul li a:hover{
color:#fff !important;
}
footer a.logo{
color: #fff !important;
text-decoration: none !important;
font-size: 14px;
font-weight: bold;
position: relative;
text-transform: uppercase;
margin-left: 16px;
display: inline-block;
margin-top: 7px;
}
footer a.logo i{
font-style: normal;
position: absolute;
width: 60px;
display: block;
left: 48px;
top: 18px;
font-size: 12px;
color: #fff;
}
footer a.logo:before{
content: '';
display: inline-block;
background: url('../img/sprite.png') no-repeat -19px -70px;
width: 48px;
height: 37px;
vertical-align: text-top;
}
footer p{
width: 90%;
margin-right: 10%;
padding: 9px 0;
line-height: 18px;
background-color: #058cc7;
font-weight: bold;
font-size: 14px;
color:#fff;
text-transform: uppercase;
text-shadow: 0 1px rgba(0,0,0,0.1);
box-shadow: 0 0 3px rgba(0,0,0,0.3);
margin-bottom: 20px;
opacity:0.9;
cursor:default;
-webkit-transition: opacity 0.4s;
-moz-transition: opacity 0.4s;
transition: opacity 0.4s;
}
footer > ul > li:hover p{
opacity:1;
}
footer p:before{
content: '';
display: inline-block;
background: url('../img/sprite.png') no-repeat;
width: 16px;
height: 18px;
margin: 0 12px 0 15px;
vertical-align: text-bottom;
}
footer p.home{
background-color: #F58020;
}
footer p.home:before{
background-position: 0 -110px;
}
footer p.services{
background-color: #F58020;
}
footer p.services:before{
background-position: 0 -129px;
}
footer p.reachus{
background-color: #F58020;
}
footer p.reachus:before{
background-position: 0 -89px;
}
z-indexon all divs like the .result fixed the problem
I'm currently experimenting with Twitter Bootstrap but I have a problem with my fixed sidebar.
When you hover over a menu item on the left, you can see that the menu doesn't stop where the content area starts. I don't really know how to explain it properly so I hope this is clear enough.
I'd like to know if there's a solution for this.
Replace CSS as below
#sidebar .nav {
width: 95%;
position: fixed;
}
to
#sidebar .nav {
width: 10%; // change width as your choice
position: fixed;
}
you have select width of sidebar 95% of browser window.
DEMO
HTML
<div id="wrapper">
<!-- Sidebar -->
<div id="sidebar-wrapper">
<ul class="sidebar-nav">
<li class="sidebar-brand">Fixed Menu
</li>
<li>Menu 1
</li>
<li>Menu 2
</li>
<li>Menu 3
</li>
<li>Link 1
</li>
<li>Link 2
</li>
<li>Link 3
</li>
<li>Link 4
</li>
</ul>
</div>
<!-- Page content -->
<div id="page-content-wrapper">
<div class="content-header">
<h1>
<a id="menu-toggle" href="#" class="btn btn-default btn-success"><i class="icon-reorder"></i></a>
Sidebar Fixed
</h1>
</div>
<!-- Keep all page content within the page-content inset div! -->
<div class="page-content inset">
<div class="row">
<div class="col-md-12">
<p class="lead">Resize window to see effect.</p>
</div>
</div>
</div>
</div>
</div>
CSS
#wrapper {
padding-left: 250px;
transition: all 0.4s ease 0s;
}
#sidebar-wrapper {
margin-left: -250px;
left: 250px;
width: 250px;
background: #000;
position: fixed;
height: 100%;
overflow-y: auto;
z-index: 1000;
transition: all 0.4s ease 0s;
}
#page-content-wrapper {
width: 100%;
}
.sidebar-nav {
position: absolute;
top: 0;
width: 250px;
list-style: none;
margin: 0;
padding: 0;
}
.sidebar-nav li {
line-height: 40px;
text-indent: 20px;
}
.sidebar-nav li a {
color: #999999;
display: block;
text-decoration: none;
}
.sidebar-nav li a:hover {
color: #fff;
background: rgba(255,255,255,0.2);
text-decoration: none;
}
.sidebar-nav li a:active,
.sidebar-nav li a:focus {
text-decoration: none;
}
.sidebar-nav > .sidebar-brand {
height: 65px;
line-height: 60px;
font-size: 18px;
}
.sidebar-nav > .sidebar-brand a {
color: #999999;
}
.sidebar-nav > .sidebar-brand a:hover {
color: #fff;
background: none;
}
.content-header {
height: 65px;
line-height: 65px;
}
.content-header h1 {
margin: 0;
margin-left: 20px;
line-height: 65px;
display: inline-block;
}
#menu-toggle {
display: none;
}
.inset {
padding: 20px;
}
#media (max-width:767px) {
#wrapper {
padding-left: 0;
}
#sidebar-wrapper {
left: 0;
}
#wrapper.active {
position: relative;
left: 250px;
}
#wrapper.active #sidebar-wrapper {
left: 250px;
width: 250px;
transition: all 0.4s ease 0s;
}
#menu-toggle {
display: inline-block;
}
.inset {
padding: 15px;
}
}
js
<!-- Custom JavaScript for the Menu Toggle -->
$("#menu-toggle").click(function(e) {
e.preventDefault();
$("#wrapper").toggleClass("active");
});