How can I style the form field as shown in the screenshot, with a border, while cropping the top-left and bottom-right corners?
I have tried to use clip-path: polygon(), but it varies on different screen sizes. I need a consistent setting that works for all screen sizes.
<div class="formCell surname ">
<label>Surname<span>*</span></label>
<input type="text" placeholder="" name="surname" id="" class="text" value="">
</div>

You can use
clip-pathwith units of%orpx, so along with variables for easy width and height changes, I've just wrote this code. The border "effect" is made using two elements (one of those is pseudo-element which cannot be applied to aninputso I've used acontenteditablediv).Here's an improved version with an
input. Use this one: