SHARE
TWEET

navbar.component.css

a guest Dec 11th, 2019 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  .space{
  2.     width:350px;
  3.   }
  4.  
  5. .dropdown{
  6.     float:right;
  7. }
  8.  
  9. .forminput{
  10.     margin:5px;
  11. }
  12.  
  13. .formbutton{
  14.     margin:5px;
  15.     float:right;
  16. }
  17.  
  18. /* Add a black background color to the top navigation */
  19. .topnav {
  20.   background-color: #333;
  21.   overflow: hidden;
  22. }
  23.  
  24. /* Style the links inside the navigation bar */
  25. .topnav a {
  26.   float: left;
  27.   display: block;
  28.   color: #f2f2f2;
  29.   text-align: center;
  30.   padding: 14px 16px;
  31.   text-decoration: none;
  32.   font-size: 17px;
  33. }
  34.  
  35. /* Add an active class to highlight the current page */
  36. .active {
  37.   background-color: #4CAF50;
  38.   color: white;
  39. }
  40.  
  41. /* Hide the link that should open and close the topnav on small screens */
  42. .topnav .icon {
  43.   display: none;
  44. }
  45.  
  46. /* Dropdown container - needed to position the dropdown content */
  47. .dropdown {
  48.     overflow: hidden;
  49. }
  50.  
  51. /* Style the dropdown button to fit inside the topnav */
  52. .dropdown .dropbtn-login {
  53.   font-size: 17px;
  54.   border: none;
  55.   outline: none;
  56.   color: white;
  57.   padding: 14px 16px;
  58.   background-color: inherit;
  59.   font-family: inherit;
  60.   margin: 0;
  61. }
  62.  
  63. /* Style the dropdown content (hidden by default) */
  64. .dropdown-content-login {
  65.   display: none;
  66.   position: absolute;
  67.   background-color: #f9f9f9;
  68.   min-width: 160px;
  69.   box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  70.   z-index: 1;
  71. }
  72.  
  73. /* Style the links inside the dropdown */
  74. .dropdown-content-login a {
  75.   float: none;
  76.   color: black;
  77.   padding: 12px 16px;
  78.   text-decoration: none;
  79.   display: block;
  80.   text-align: left;
  81. }
  82.  
  83. /* Add a dark background on topnav links and the dropdown button on hover */
  84. .topnav a:hover, .dropdown:hover .dropbtn-login {
  85.   background-color: #555;
  86.   color: white;
  87. }
  88.  
  89. /* Add a grey background to dropdown links on hover */
  90. .dropdown-content-login a:hover {
  91.   background-color: #ddd;
  92.   color: black;
  93. }
  94.  
  95. /* Show the dropdown menu when the user moves the mouse over the dropdown button */
  96. .dropdown:hover .dropdown-content-login {
  97.   display: block;
  98. }
  99.  
  100. /* 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) */
  101. @media screen and (max-width: 600px) {
  102.     .topnav a:not(:first-child), .dropdown .dropbtn-login {
  103.         display: none;
  104.     }
  105.  
  106.     .topnav a.icon {
  107.         float: right;
  108.         display: block;
  109.     }
  110.    
  111.     .space{
  112.         width:0px;
  113.     }
  114.  
  115.     .dropdown{
  116.         float:left;
  117.     }
  118. }
  119.  
  120. /* 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) */
  121. @media screen and (max-width: 600px) {
  122.   .topnav.responsive {position: relative;}
  123.   .topnav.responsive a.icon {
  124.     position: absolute;
  125.     right: 0;
  126.     top: 0;
  127.   }
  128.   .topnav.responsive a {
  129.     float: none;
  130.     display: block;
  131.     text-align: left;
  132.   }
  133.   .topnav.responsive .dropdown {float: none;}
  134.   .topnav.responsive .dropdown-content-login {position: relative;}
  135.   .topnav.responsive .dropdown .dropbtn-login {
  136.     display: block;
  137.     width: 100%;
  138.     text-align: left;
  139.   }
  140. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top