I have a hard time with this problem:
I want to do with css this:
Like the picture: two trapezes with a rounded corner (important!), one trapeze with text and the other with a picture, or icon, the size of the trapeze with the icon can be thinner, but both trapezes must be the same size.
I don't know if should use svg as a background or pure css. If i use svg, how can i insert text and the icon inside the trapezes with a rounded corner?
Thank you in advance for your help.
Here's an approach using SVG.
And a version with two cells added with sample text content.
Here is another idea with one element and less of code. Simply rely on skew and both pseudo element:
It's complicated, but possible to achieve in pure CSS.
You'll need to make use of pseudo
:after
and:before
elements in order to gain the flat edges on the sides (making use of awhite
border on one side), and then make use ofborder-top-left-radius
andborder-bottom-right-radius
on the main element in order to get the curvature. Lining these up can be complicated, but depending on how much of an 'edge' you want, you can play around with these values.Here's an example: