Answers for "flexbox in nav bar"

CSS
-1

hwo to use flexbox to make a nav bar

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
Posted by: Guest on December-29-2019
0

flex box code for navigation bar

/* Basic styling */
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}
body {
    font-family: sans-serif;
    font-size: 16px;
}
nav {
    background: #222;
    padding: 0 15px;
}
a {
    color: white;
    text-decoration: none;
}
.menu,
.submenu {   
    list-style-type: none;
}
.logo {
    font-size: 20px;
    padding: 7.5px 10px 7.5px 0;
}
.item {
    padding: 10px;
}
.item.button {
    padding: 9px 5px;
}
.item:not(.button) a:hover,
.item a:hover::after {
    color: #ccc;
}
Posted by: Guest on February-05-2022

Browse Popular Code Answers by Language