-2

If you are unable to understand, then please open the image. I want to draw a black vertical line at left border of a div

I apologise for my useless paint ability. enter image description here What must I do to make this in css?.

Thanks.

Bug
  • 137
  • 1
  • 11
  • 1
    [What topics can I ask about here?](https://stackoverflow.com/help/on-topic), [How do I ask a good question?](https://stackoverflow.com/help/how-to-ask) – Andreas Jul 20 '21 at 07:18

2 Answers2

0

Please check out this link https://stackoverflow.com/a/24207393/10293708, has a similar question. But all in all, I would also suggest you to do try out doing something using css first and maybe you could add a jsfiddle link to what you have achieved so far, so that others can help better.

Ankit Gupta
  • 175
  • 6
0

Your HTML Code

<div class="badge">
    <p class="text">New</p>
</div>

CSS for background

.badge {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 65%, 0 100%);
    background-color : red;
    height: 100px;
    width:50px
}
.text {
    text-align: center;
    padding-top: 35px;
}

You can use bennettfeely for diffrent css shapes that will generate a clip-path of the shape