view the image hereI am using Blogger and have implemented CSS for H2, H3, and H4 tags with custom background and text size styles. However, I am facing an issue where I want the background size to automatically adjust according to the text size instead of spanning the entire width of the page.
Is there anyone who can provide me with a different code snippet or CSS trick to achieve this?
After replacing "display: block;" with "display: inline-block", the issue was partially resolved but resulted in some problems as illustrated in image number 2.
.post-body h3,.post-body h2,.post-body h4{background-color:#333333;width: auto;padding:10px 20px;color:#FFF;display: block;margin:5px 0 15px;border-bottom:1px solid $(post.line)}