Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- body {
- margin: 0;
- position: relative;
- }
- nav {
- position: sticky;
- background-color: #333;
- color: #fff;
- top: 0;
- z-index: 1;
- }
- ul{
- display: grid;
- grid-template-columns: 5% 5% 5% 45%;
- }
- nav ul {
- list-style: none;
- padding: 0;
- margin: 0;
- justify-content: center;
- }
- nav li {
- text-align: center;
- }
- nav li:last-child {
- grid-column: 4;
- justify-self: flex-end;
- }
- nav a {
- color: #fff;
- text-decoration: none;
- padding: 1em;
- display: block;
- }
- nav a:hover {
- background-color: #444;
- }
- section {
- width: 300px;
- margin: 50px;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement