I'm looking to make the width of the box adjust to the text inside it
Here is the HTML code snippet:
<span class="box">Testing content of the box</span>
And here is the CSS code snippet:
.box {
padding-left:5px;
padding-right:5px;
color: #fff;
background-color: #ff9c00;
-moz-border-radius: 0;
-webkit-border-radius: 0;
border-radius: 0;
display: inline-block;
}
Should it look like this?
https://i.sstatic.net/0cJEq.png
Or perhaps more like this?
https://i.sstatic.net/HcfKX.png
The goal is to maintain equal padding on both left and right sides regardless of the text size.
Any suggestions on how I can achieve this?