@Da-vi-de
Posted
Hi, it looks nice and full responsive, better than mine, at the time i didn't follow mobile first approach! You can do it with the pseudo element ::before
like so:
.card-color-insta {
position: relative;
&::before {
position: absolute;
content: '';
width: 100%;
height: 4px;
top: -1px;
left: 0;
background: $color-instagram;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
}
That's because linear gradients don't work as background, i copied and pasted my code, i used scss!
Hope it helps a little, happy coding :-)
Marked as helpful
@stevenabaco
Posted
@Da-vi-de Your solution of using pseudo element ::before worked to add the gradient fill to the top of the element! Thanks for sharing this strategy. I need to learn SCSS. I just modified your code into CSS for now.
Happy coding! 👍🏻