NameHere
NameHere

Reputation: 21

CSS Box Shadows

Can someone help me with what I'm doing wrong in the CSS code below, I want to learn and I want to make what is in the attached image. The instructions are: Styles:

My code

.test {
    width: 400px;
    height: 100px;
    background-color: beige;
    border-radius: 20px;
    text-align: center;
    font-size: 50px;
    font-weight: 700;
    box-shadow: inset 5 5 5px rgba(0, 0, 0, 0.3)}

Thank you

Upvotes: 0

Views: 508

Answers (2)

shadow2020
shadow2020

Reputation: 1351

.test {
    width: 400px;
    height: 100px;
    background-color: beige;
    border-radius: 20px;
    text-align: center;
    font-size: 50px;
    font-weight: 700;
    padding-top: 20px;
    box-shadow: inset 5px 5px 5px rgba(0, 0, 0, 0.3)}

Added padding-top for your requirement of text being moved 20 px from the top. This has everything else you need I believe.

Upvotes: 1

teooykas
teooykas

Reputation: 1

Try: box-shadow: inset 5px 5px 5px rgba(0, 0, 0, 0.3);

Upvotes: 0

Related Questions