How can I style a button like this example?
Below is my current code:
.button {
border-color: red;
border-radius: 8px
}
.button::after {
content: '';
background-color: red;
display: block;
width: inherit;
height: 3px;
}
<button class="button">Click me </button>
The issue I'm facing is that the button's width extends to 100% of the screen, but I need it to be the width of the button itself. The challenge is that the button text is dynamic, so I can't specify a fixed width for it.