-
Hi, I have the following custom CSS to add a colored background over H2 headings with padding above / below. However, if I try to put padding-left: 20px & padding-right: 20px, it doesn’t work and shifts the text to the left instead of centering it. Am I missing something?
/*Add colored background to H2 headings*/
.single-post h2 {
background-color: #AEDE82;
padding-top: 25px;
padding-bottom: 25px;
text-align: center;
}Thanks
-
David
Hi there,
can you share a link to where i can see this H2?
-
Hi, Yes you can see it on the following page. It’s the mobile version that required the left / right padding mainly. https://makemesustainable.com/sustainable-flower-delivery/
-
David
Try this:
.single-post h2 { background-color: #aede82; padding: 25px 10px; text-align: center; }If that causes an issue, leave the CSS in place and let me know.
-
Fixed, thanks.
-
David
Glad to hear that!
- You must be logged in to reply to this topic.