I want to achieve such thing:
The text is located inside a half circle, which is on a card. The circle has a minimum width and a maximum ( in order not to full up the full card ). The text can be in 1 or 2 rows maximum.
I cant handle the text positioning, so it would be 10px from the card border. Any ideas?
Here is my current snippet:
<!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-css -->.list_item {
height: 85px;
width: 300px;
background: white;
border-radius: 25px;
border: 1px solid black;
margin-bottom: 5px;
overflow: hidden;
position: relative;
}
.circle {
display: inline-block;
background: blue;
min-height: 200px;
min-width: 200px;
max-width:300px;
border-radius:99999px;
transform: translate(-50%, -50%);
}
.text {
overflow-wrap: break-word;
overflow: hidden;
}
<!-- language: lang-html -->
<div class="list_item">
<div class="circle">
<div class="text">
Item 1
</div>
</div>
</div>
<div class="list_item">
<div class="circle">
<div class="text">
Item 2222222222222222222222222222222222222222222222222222222222222222222222222
</div>
</div>
</div>
<div class="list_item">
<div class="circle">
<div class="text">
Item 3 3333 3333
</div>
</div>
</div>
<!-- end snippet -->
As you can see the text is flying somewhere. Is there a way to achieve such things:
Or did i miss something and gone a wrong direction?