I’m trying to create an input block that has a rectangular shape with a corner offset to the bottom right. I’ve tried using the ::after pseudo-element to achieve this form, but I can’t seem to get the expected result.
<label className="signIn-input">
<ReactSVG src={email} className='signIn-input-img' />
<input type="text" placeholder='Email' className='signIn-input-item' />
</label>
.signIn-input {
display: flex;
align-items: center;
gap: 8.5px;
border: 1px solid #A4A4A4;
width: 100%;
height: 56px;
position: relative;
}
.signIn-input::after {
content: '';
position: absolute;
bottom: -5px;
right: -2px;
width: 0;
border-style: solid;
border-width: 8px 0 8px 8px;
border-color: transparent transparent transparent #A4A4A4;
transform: rotate(45deg);
}
In my code, the ::after pseudo-element is supposed to apply a corner offset to the bottom right of the input block, but it doesn’t work as expected. How can I fix this problem and achieve the desired result?
New contributor
Maksym Strilets is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.