Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

how to make div "more round"

I need to make my div look like picture, I tried to change border-radius, but it doesn’t help. It’s only become more round along the side edges, but not on top and bottom

PIC1

  <div *ngIf="message.type === 'appeal'" class="first-message">
        <span class="chat-open" > 
<span class="chat-open-text" >Чат открыт</span>
 <span>{{message.date| date: 'dd.MM.yyyy HH:mm'}}</span> </span>
     </div> 

.first-message {
    
  margin-top: 10%;
  margin-bottom: 10%;
  display: block;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
    
.chat-open-text{
  border-radius: 10%;
  padding: 15px;
  background-color: #F03E3E;
  color: white;
  margin-right: 5% ;
}

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You have to add display : inline-flex to your span, and set border-radius to 25px and it will work

  <div *ngIf="message.type === 'appeal'" class="first-message">
        <span class="chat-open" > 
<span class="chat-open-text" >Чат открыт</span>
 <span>{{message.date| date: 'dd.MM.yyyy HH:mm'}}</span> </span>
     </div> 
.first-message {
    
  margin-top: 10%;
  margin-bottom: 10%;
  display: block;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
 }   
.chat-open-text {
 border-radius: 25px;
    background-color: #F03E3E !important;
    color: white;
    margin-right: 5%;
    padding: 10px 30px;
    display: inline-flex;
  
}
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading