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
Jochem14mo 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
Jochem14mo 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
Jochem14mo 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
Seema14mo ago
ok - thanks Thank you so much - it worked 🙂
Jochem
Jochem14mo ago
glad to help 🙂
ἔρως
ἔρως14mo 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
Jochem14mo ago
nice catch, I didn't spot that one
ἔρως
ἔρως14mo ago
i almost didnt either
Want results from more Discord servers?
Add your server