I am trying to create a container with an up arrow attached to it. I am familiar with the drawing trick and consider this a likely solution, but it only works for known sizes, I think, since you need to specify a border in em or px.
The form I would like to do is this:
. / \ / \ / \ | flex | | |
If the content area can be bent to different sizes as a percentage of the parent container.
Here is the CSS with the problem area marked:
.metric { display: inline-block; position: relative; height: 150px; width: 50%; background: lawngreen; } .metric:after { position: absolute; top: -25px; left: 0; content: ''; background: white; width: 100%; height: 0; border: 75px solid white; border-top: none; border-bottom: 25px solid lawngreen; box-sizing: border-box; }
Here is jsfiddle: http://jsfiddle.net/C8XJW/2/
Do you guys know any way to take this off?
source share