@charset "utf-8";
/* CSS Document */
p.blackfont { 
  color: #000000;
}
h4.blackfont { 
  color: #000000;
}
h2.redfont { 
  color: #FF0000;
}

.art-lightgray,.w3-hover-lightgray:hover{color:#fff!important;background-color:#cccccc!important}



 /* The sidebar menu */
.sidebar {
  height: 100%; /* 100% Full-height */
  width: 0; /* 0 width - change this with JavaScript */
  position: fixed; /* Stay in place */
  z-index: 1; /* Stay on top */
  top: 0;
  left: 0;
  background-color: #111; /* Black*/
  overflow-x: hidden; /* Disable horizontal scroll */
  padding-top: 60px; /* Place content 60px from the top */
  transition: 0.5s; /* 0.5 second transition effect to slide in the sidebar */
}

/* The sidebar links */
.sidebar a {
  padding: 8px 8px 8px 32px;
  text-decoration: none;
  font-size: 25px;
  color: #818181;
  display: block;
  transition: 0.3s;
}

/* When you mouse over the navigation links, change their color */
.sidebar a:hover {
  color: #f1f1f1;
}

/* Position and style the close button (top right corner) */
.sidebar .closebtn {
  position: absolute;
  top: 0;
  right: 25px;
  font-size: 36px;
  margin-left: 50px;
}

/* The button used to open the sidebar */
.openbtn {
  font-size: 20px;
  cursor: pointer;
  background-color: #111;
  color: white;
  padding: 10px 15px;
  border: none;
}

.openbtn:hover {
  background-color: #444;
}

/* Style page content - use this if you want to push the page content to the right when you open the side navigation */
#main {
  transition: margin-left .5s; /* If you want a transition effect */
  padding: 20px;
}

/* On smaller screens, where height is less than 450px, change the style of the sidenav (less padding and a smaller font size) */
@media screen and (max-height: 450px) {
  .sidebar {padding-top: 15px;}
  .sidebar a {font-size: 18px;}
}
ADVERTISEMENT
Step 3) Add JavaScript:
Example
/* Set the width of the sidebar to 250px and the left margin of the page content to 250px */
function openNav() {
  document.getElementById("mySidebar").style.width = "250px";
  document.getElementById("main").style.marginLeft = "250px";
}

/* Set the width of the sidebar to 0 and the left margin of the page content to 0 */
function closeNav() {
  document.getElementById("mySidebar").style.width = "0";
  document.getElementById("main").style.marginLeft = "0";
}

Tip: Go to our CSS Navbar Tutorial to learn more about navigation bars.

 
W3schools Pathfinder
Track your progress - it's free!
 
ADVERTISEMENT
Get Certified
COLOR PICKER
colorpicker
Ads by
ADVERTISEMENT

/* gradient */


#grad1 {
    height: 200px;
    background-image: linear-gradient(to left, rgba(27,200,121,0), rgba(52,164,113,1));
}
#grad-300 {
    height: 300px;
    background-image: linear-gradient(to left, rgba(27,200,121,0), rgba(52,164,113,1));
}


/* from bootstrao */
.bg-warning {
  background-color: #fcf8e3;
}


/* ******** responsive menu ************** */

* {box-sizing: border-box;}

body { 
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
}

.header {
  overflow: hidden;
  background-color: #f1f1f1;
  padding: 20px 10px;
}

.header a {
  float: left;
  color: black;
  text-align: center;
  padding: 12px;
  text-decoration: none;
  font-size: 18px; 
  line-height: 25px;
  border-radius: 4px;
}

.header a.logo {
  font-size: 25px;
  font-weight: bold;
}

.header a:hover {
  background-color: #ddd;
  color: black;
}

.header a.active {
  background-color: dodgerblue;
  color: white;
}

.header-right {
  float: right;
}

@media screen and (max-width: 500px) {
  .header a {
    float: none;
    display: block;
    text-align: left;
  }
  
  .header-right {
    float: none;
  }
}
h1 {
  font-weight: bold;
  color: #372D2D;
  font-size: 29px;
}
h2 {
  font-weight: bold;
  color: #701F1F;
  font-size: 26px;
}

.mybox {
  background-color: lightgrey;
  width: 90%;
  border: 15px solid green;
  padding: 50px;
  margin: 20px;
}

.newspaper {
  border: solid black 1px;
  background-color: lightgreen;
  column-count: 2;
  column-gap: 40px;
}

* {
  box-sizing: border-box;
}

/* Create two equal columns that floats next to each other */
.column {
  float: left;
  width: 50%;
  padding: 10px;
  /* height: 300px;  Should be removed. Only for demonstration */
}

/* Clear floats after the columns */
.row:after {
  content: "";
  display: table;
  clear: both;
}

/* Responsive layout - makes the two columns stack on top of each other instead of next to each other */
@media screen and (max-width: 600px) {
  .column {
    width: 100%;
  }
    
    
 


