I want to design a yellow div with wide left and right borders that gradually fade to white towards the edges to create a transparent effect.
Although I have successfully created the div, I am struggling to achieve the desired gradient:
.fade {
margin: 2em 2em; padding-top: 2em; padding-bottom: 2em;
background: rgb(242,242,194);
border-right: 3em black solid;
border-left: 3em black solid;
border-image: linear-gradient(90deg, rgb(255, 255, 255) 0%, rgb(242, 242, 194) 100%);
{
<div class="fade">Text</div>
As shown above, the linear gradient successfully changes the black borders to yellow, but it does not achieve the desired white fading effect. The gradient is not visible at all.
The final design I am aiming for is like this:
https://i.sstatic.net/RJhcL.png
What am I doing incorrectly?