Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

HTML
<div class="bg-primary rounded-pill">
  <p class="text-right">
  TOTAL AMOUNT
  </p>
  <p class="text-right">
  200
  </p>
</div>


What I have tried:

How can I include the text that is inside a half capsule shape.
Posted
Updated 11-Dec-22 14:13pm
v3

1 solution

You can achieve it using border-radius.

Here, have a look: CSS Rounded Corners[^]

Examples:
CSS
#rcorners1 {
  border-radius: 25px;
  background: #73AD21;
  padding: 20px;
  width: 200px;
  height: 150px;
}

#rcorners2 {
  border-radius: 25px;
  border: 2px solid #73AD21;
  padding: 20px;
  width: 200px;
  height: 150px;
}

#rcorners3 {
  border-radius: 25px;
  background: url(paper.gif);
  background-position: left top;
  background-repeat: repeat;
  padding: 20px;
  width: 200px;
  height: 150px;
}
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900