navbar.css 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. :root {
  2. --navbar-bg-color: white;
  3. --navbar-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  4. --brand-font-size: 1.5rem;
  5. --brand-color: #333;
  6. --link-font-size: 1rem;
  7. --link-color: #333;
  8. --hover-link-color: #6c63ff;
  9. }
  10. /* Navbar Styling */
  11. .navbar {
  12. position: sticky;
  13. top: 0; /* Stick to the top */
  14. z-index: 1000; /* Ensures the navbar stays above other elements */
  15. display: grid;
  16. grid-template-columns: auto 1fr auto;
  17. align-items: center;
  18. background-color: var(--navbar-bg-color);
  19. padding: 10px 20px;
  20. box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  21. width: 100%;
  22. max-width: 96%;
  23. border-radius: 8px;
  24. }
  25. .navbar-brand {
  26. font-size: var(--brand-font-size);
  27. font-weight: bold;
  28. color: var(--brand-color);
  29. }
  30. .navbar-links {
  31. display: grid;
  32. grid-template-columns: repeat(4, auto);
  33. gap: 20px;
  34. list-style: none;
  35. justify-self: end;
  36. }
  37. .navbar-links a {
  38. text-decoration: none;
  39. color: var(--link-color);
  40. font-size: var(--link-font-size);
  41. transition: color 0.3s ease;
  42. }
  43. .navbar-links a:hover {
  44. color: var(--hover-link-color);
  45. }