Site logo

Archived topic

Limit the Text Margin to Post and Page Content

3 replies · Started by Sherman on November 25, 2020

Viewing posts 1–4 of 4

What I need is to increase the margin of headings and text of the main contents of a blog or page, but when I change the css file, it always comes with some side-effects. Can I limit the text margin only in these places?

For example, if I use:
p,h1,h2,h3 {margin:30px}
all text, including text in page hero or my homepage block will change together.

if I use:
.inside-article p,h2 {margin:30px;}
it seems the same, margin changed for text almost everywhere

Hi there,

try:

h1.entry-title,
.entry-content p,
.entry-content h2,
.entry-content h3 {
    /* your styles */
}

However, may i ask why you need to add 30px all round your text elements ?

Thanks, David. I need the spacing for the overall layout fitting.

You're welcome

This archived topic is closed to new replies.