Difference between revisions of "Template:BIMATOX Project"

Line 186: Line 186:
 
.show {
 
.show {
 
     display: block;
 
     display: block;
 +
}
 +
 +
/* When the screen is less than 600 pixels wide, hide all links, except for the first one ("Home"). Show the link that contains should open and close the topnav (.icon) */
 +
@media screen and (max-width: 600px) {
 +
  .navbar a:not(:first-child) {display: none;}
 +
  .navbar a.icon {
 +
    float: right;
 +
    display: block;
 +
  }
 +
}
 +
 +
/* The "responsive" class is added to the topnav with JavaScript when the user clicks on the icon. This class makes the topnav look good on small screens (display the links vertically instead of horizontally) */
 +
@media screen and (max-width: 600px) {
 +
  .navbar.responsive {position: relative;}
 +
  .navbar.responsive a.icon {
 +
    position: absolute;
 +
    right: 0;
 +
    top: 0;
 +
  }
 +
  .navbar.responsive a {
 +
    float: none;
 +
    display: block;
 +
    text-align: left;
 +
  }
 
}
 
}
  

Revision as of 02:23, 2 November 2017