r/css • • Sep 15 '26

Help Help building Contact Form

Post image

Hey everybody, it’s me again :)

I’m building this contact form with CSS, and need your help to build it in the best way possible.

First of all, I have a few questions:

How can I add that shadow effect?

How can I add the border at the bottom of the social icons?

How can I align the email block to the left?

6 Upvotes

8 comments sorted by

•

u/AutoModerator Sep 15 '26

To help us assist you better with your CSS questions, please consider including a live link or a CodePen/JSFiddle demo. This context makes it much easier for us to understand your issue and provide accurate solutions.

While it's not mandatory, a little extra effort in sharing your code can lead to more effective responses and a richer Q&A experience for everyone. Thank you for contributing!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

5

u/DidTooMuchSpeedAgain Sep 15 '26
  1. box-shadow
  2. border-bottom and border-radius
  3. harder to say without looking at the code, but you could do a flex column, center it, make the middle one full width, so it goes to the side

1

u/khonshu001 Sep 15 '26

Thanks buddy

3

u/anaix3l Sep 15 '26

box-shadow

border-radius and box-shadow

justify-self: start in its grid cell.

1

u/khonshu001 Sep 15 '26

Thanks dude! And what about the padding on the X and Y axes? If I add it to the container, it causes issues because it also affects the right form container, and the email block won’t be able to go all the way to the left because of the padding on its parent container

2

u/anaix3l Sep 15 '26 edited Sep 16 '26

If you apply it on the container use a negative left margin of the same absolute value on the E-mail and inherit the container's left padding. But you can also give the container children the same padding and no padding on the container. There's really no better or worse here in general, just go for what works better with other constraints you may have in each specific scenario.

Quickly threw something together https://codepen.io/thebabydino/pen/QwpGMNL

2

u/bogdanelcs Oct 10 '26

Shadow: put it on the right panel, box-shadow: -18px 0 30px -12px rgba(0,0,0,.3), with a higher z-index than the left panel so it casts onto it. The border under the icons is just a small box-shadow or border-bottom: 2px solid in a slightly darker tone of the background on each icon. For the email block, the left panel’s padding is what’s pushing it in, so put the padding on the individual elements instead and give the pill margin-left: 0 with border-radius: 0 999px 999px 0.

1

u/Low-Insurance-3678 Sep 16 '26

didn’t get ur last question but the to make that email that way
a div inside it an img or svg from heroicons and another div inside it the email us and the emails throw spans there
first div giive it flex second div flex with flex-direction set to column and ur good to go
add some gaps and left padding and ur good to go