Question about using CSS to make shapes…I want to replicate the ribbon like heading on the right sidebar on http://phydeaux.com/locations/cary/. where it says Upcoming Events…that is done with graphics for triangular ends…I know you can do this in pure CSS with the before and after elements, but not sure the actual CSS to do that
This is the “pointer” adapted to have the notch in both ends.
Though it still relies on fixed dimensions. Maybe with some more work it could be adapted to a dynamic size.
Also the left notch does not have transparency, so it has been constrained to the background colour. That will be OK on plain solid backgrounds only.
When you said it was magic numberish, I assumed it would be a fixed size.
There is still the problem with wrapping, which is a tough one.
But then there comes a point where you have to leave CSS shapes and go with SVG.
However that set me thinking and it can be done with one element and no extra before or after elements if we use clip path. That will allow the element to stretch as required.