i am trying to make a linear gradient background with border radius with visible border. I tried multiple methods and i am stuck from yesterday.
i put here my example code
https://codesandbox.io/p/sandbox/unruffled-dawn-yrzg69?file=%2Fsrc%2FDemo.js%3A311%2C1
background works fine but i am not able to see prominent border solid how to achieve this?
i also tried this method
Border Gradient with Border Radius
This works fine but inline block not letting take it full width if i remove it then i don’t see border radius.
i am trying to achieve all of this on mui table head.
i want to take it full width with border radius, prominent border and linear gradient background.
above i gave code sandbox link. Thanks in advance.
2
Answers
This approach worked for me.
You can’t, border images are not compatible with border radius. Border images for gradients are not recommended as they cause visual artifacts, there are better ways of doing this.
Instead, hide a div with a gradient background behind your table with a width 4 pixels larger and a height 4 pixels larger than your table. Offset the left and top by two pixels, and apply a radius to that div that matches your table radius.
Like this as an example for what I am using in my code: