![html - How do I set a background-color for the width of text, not the width of the entire element, using CSS? - Stack Overflow html - How do I set a background-color for the width of text, not the width of the entire element, using CSS? - Stack Overflow](https://i.stack.imgur.com/BPjWz.png)
html - How do I set a background-color for the width of text, not the width of the entire element, using CSS? - Stack Overflow
![html - How do I set a background-color for the width of text, not the width of the entire element, using CSS? - Stack Overflow html - How do I set a background-color for the width of text, not the width of the entire element, using CSS? - Stack Overflow](https://i.stack.imgur.com/dGsob.png)
html - How do I set a background-color for the width of text, not the width of the entire element, using CSS? - Stack Overflow
![How to get background-color to half of the height? I've tried position: relative; height 50%; : r/css How to get background-color to half of the height? I've tried position: relative; height 50%; : r/css](https://preview.redd.it/6jvysa7i3ln31.png?auto=webp&s=675c1afc6a748150da76eb5c62a34dd082adee0f)