scrimba
Figma to code
Dashboard
CSS: Styling the nav bar
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

CSS: Styling the nav bar
AboutCommentsNotes
CSS: Styling the nav bar
Expand for more info
index.css
run
preview
console
*, *:before, *:after {
box-sizing: border-box;
}

:root {
--primary-color: #2D7DFF;
}

body {
background: linear-gradient(220deg, rgba(189,0,255,1) 0%, rgba(0,163,255,1) 100%);
height: 100vh;
background-attachment: fixed;
font-family: 'Poppins';
}

.container {
margin: 1em .5em;
height: calc(100% - 2em);
}

section {
background: #221F26 url('./bg.jpg');
background-size: cover;
background-blend-mode: screen;
background-position: -100px;
height: 100%;
padding: 2em;
}

nav {
display: none;
}

.logo {
color: var(--primary-color);
font-weight: 800;
text-transform: uppercase;
font-size: 1.5rem;
letter-spacing: -.1em;
text-align: center;
width: 100%;
margin: 0;
}

header {
display: flex;
}

.menu-btn {
cursor: pointer;
}

h1 {
font-size: clamp(2.5rem, -0.875rem + 8.333vw, 4rem);
font-weight: 800;
text-transform: uppercase;
color: white;
line-height: 89%;
}

.cv {
display: grid;
place-items: center;
height: 80%;
}

.content p {
font-size: clamp(2rem, -0.875rem + 8.333vw, 3rem);
font-weight: 300;
line-height: 111%;
color: #847D93;
margin-top: 1.1em;
}

.cta {
color: white;
text-decoration: none;
text-transform: uppercase;
font-weight: bold;
margin-top: 2.875em;
display: inline-block;
border: 1px solid #4D4D4D;
padding: 1.25em 1.25em 1.25em calc(2.5em + 1.5em);
position: relative;
}

.cta:before {
content: '';
position: absolute;
background: url('arrow.svg') no-repeat;
width: 1.5em;
height: 1.5em;
left: 1.25em;
}

.cta:hover {
background: var(--primary-color);
}
Console
/index.html
-7:03