Box-shadow

Hi - i am a beginner in HTML / CSS / Javascript. I have made a container div inside the body. The body has a back ground color. And the div container too has a back ground color. I wanted to give the div container a box-shadow but it does not show. Please help? I tried using position:relative and z-index:10 inside the container too.
9 Replies
Jochem
Jochem16mo ago
share your code, there's some helpful tips in #how-to-ask-good-questions for how you can do that preferably in something like codepen so people can see it live in their own browsers
Jochem
Jochem16mo ago
your boxshadow isn't properly formatted. You've just got some values in brackets, you need to add rgba:
box-shadow: 0 0 10px rgb(0, 0, 0, 5);
box-shadow: 0 0 10px rgb(0, 0, 0, 5);
Jochem
Jochem16mo ago
if you inspect the element in the devtools, and look at the property, you'll see that the boxshadow is invalid:
No description
Seema
SeemaOP16mo ago
ok - thanks Thank you so much - it worked 🙂
Jochem
Jochem16mo ago
glad to help 🙂
ἔρως
ἔρως16mo ago
also, the last value in the rgba is a value between 0 and 1 5 will be interpreted as 1 opacity if you want 5% you need to set it to 0.05
Jochem
Jochem16mo ago
nice catch, I didn't spot that one
ἔρως
ἔρως16mo ago
i almost didnt either
Want results from more Discord servers?
Add your server