Archived topic
Add shadow below the sticky header
3 replies · Started by Shami on February 6, 2021
Viewing posts 1–4 of 4
I'm using this code to add a sticky header:
.site-header {
position: sticky;
z-index: 999;
top: -10px;
}
How can I add a little shadow at the bottom of the header to make it look cool?
Hi there,
include a box-shadow property in your CSS like so:
.site-header {
position: sticky;
z-index: 999;
top: -10px;
box-shadow: 0 -6px 10px 5px rgba(0,0,0,0.5);
}
This app generates box-shadow CSS for you:
Thanks. Looks good.
Glad to be of help
This archived topic is closed to new replies.