Is it possible to move span text by adjusting the margin?
How can I provide distance from the border so that it doesn't touch?
I tried using background-position
but it didn't work.
I want the span text centered with a black background color.
div {
color: white;
}
span {
border-radius: 20px;
position: fixed;
margin-left: 8px;
margin-top: 8px;
background: black;
height: 34px;
width: max-content;
border-radius: -2px;
}
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css" rel="stylesheet"/>
<div>
<span>
<i class="fa fa-folder-open" aria-hidden="true"></i>
<i class="fa fa-lg fa-angle-right" style="margin-left:7px;"></i>
My Folder</span>
</div>