Hope you can help, really stuck:
I have these circle divs with a linear gradient border - I need to have some text centrally aligned within the circle but I have no idea how to achieve this - I am quite stuck so any help would be much appreciated!!
The code is below:
For the circle:
.white-grad {
--b:12px; /* border width*/
color: #313149;
display: inline-block;
margin: 10px;
width:214px;
position:relative;
z-index:0;
}
.white-grad:after {
content:"";
display:inline-block;
padding-top:100%;
}
.white-grad:before {
content:"";
position:absolute;
z-index:-1;
top:0;
left:0;
right:0;
bottom:0;
background: var(--c,linear-gradient(26deg, #a347dc 13%, #697cfe 87%));
-webkit-mask:radial-gradient(farthest-side,transparent calc(100% - var(--b) - 1px),#fff calc(100% - var(--b)));
mask:radial-gradient(farthest-side,transparent calc(100% - var(--b) - 1px),#fff calc(100% - var(--b)));
border-radius:50%;
}
And the text:
.text {
width: 98px;
height: 44px;
font-family: OpenSans;
font-size: 19px;
font-weight: 600;
font-stretch: normal;
font-style: normal;
line-height: 1.16;
letter-spacing: -0.52px;
text-align: center;
color: #000000;
}
Many thanks in advance,