gradient navbar?

i want to know how this netflix navbar (if it even is a navbar lol idk) is implemented with this kind of blurly/gradient
No description
14 Replies
greenleaf02
greenleaf02OP9mo ago
like how does it get slightly darker to the top like that?
ἔρως
ἔρως9mo ago
one way to do it is with a gradient on the top
greenleaf02
greenleaf02OP9mo ago
just normal gradient with like a max height type of thing? how do i keep it clear?
ἔρως
ἔρως9mo ago
you keep it clear by going from black to transparent you should use a gradient generator
greenleaf02
greenleaf02OP9mo ago
okay thank you, let me give it a go🤝
ἔρως
ἔρως9mo ago
you're welcome
greenleaf02
greenleaf02OP9mo ago
bro any idea why its looking like this with that gap on the top and sides? Also the gradient only seems to appear when i have text and is not really much like the first image i sent this is the html:
<div class="background">
<div class="nav">
testttttttt
</div>
</div>
<div class="background">
<div class="nav">
testttttttt
</div>
</div>
this is the css"
.nav{
max-height: 10px;
color: white;
background: linear-gradient(to top, transparent 0%, black 100%);
}
.nav{
max-height: 10px;
color: white;
background: linear-gradient(to top, transparent 0%, black 100%);
}
No description
ἔρως
ἔρως9mo ago
it has 10 pixels to transition from transparent to black that's literally the problem
greenleaf02
greenleaf02OP9mo ago
i changed it to 150px so the gradient has more space, but that space between tho, is there like some default padding or something?
No description
ἔρως
ἔρως9mo ago
yes, the body has a padding of 8px, in some browsers, by default
greenleaf02
greenleaf02OP9mo ago
how can i override it, i mean the netflix site did it right?🥲
ἔρως
ἔρως9mo ago
you override it by setting the padding to 0 and i don't know i dont use netflix
greenleaf02
greenleaf02OP9mo ago
lol same, im just practicing cloning some websites to improve my skills
ἔρως
ἔρως9mo ago
i know, i see a lot of people doing that same netflix thing
Want results from more Discord servers?
Add your server