I need help on this website: http://www.naturalhealthherbal.saihadeveloper.website/ on the sidebar h4 heading of the widget. How could I make the background not expand to full width? The H4 is inheriting the width of the widget and because of that the background color is expanding in full width. I like the background just exact the word of the heading title.
Thanks in advance.
By default the h4 is a block level element which expands to the full width of it’s parent.
You can make it shrink wrap to the width of it’s content (the text) by setting it to
display:inline-block; and removing the 50% width that you have set on it.
Then you can adjust your padding values if needed.
That was a quick fix! Thank you so much my savior!
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.