How do I adjust the line height in the body of a post?
-
Hi, I’m new at all of this, and have never edited a blog’s code before. I am setting up my blog using Munding 1.4, which I like, but the line spacing is very tight in my posts. So the text looks very densely packed. I’m happy with everything else. If I can get this figured out I will soon go live. :)
Thanks!The blog I need help with is: (visible only to logged in users)
-
As you are self-hosted, https://wordpress.org/support/forum/themes-and-templates is the right place to seek help with your blog :-)
-
Before sending someone to another forum, I like to try to help give some explanation or a little support from here if I can. In this case, I can tell you that you will need to use the “line-height” property in CSS to adjust the spacing between lines inside a paragraph. A lot of websites set the line height to 1.4em or 1.6em, and the exact number to use will depend on your font and general site appearance so it’s good to pick one and then just experiment until you get it right. The trickiest part will be to figure out what CSS selector to use when applying the rule.
Here is some background on the line-height property:
https://developer.mozilla.org/en-US/docs/Web/CSS/line-heightIf you wanted to adjust the line height for just paragraphs, you could try something like this:
p { line-height: 1.4em; }If the CSS in the theme is fairly simple, you might be able to do something like this (if the post content containers indeed have a class name of “entry-content”—it depends on what theme you are using):
.entry-content { line-height: 1.4em; }Even though this is a WordPress.com support page, it may help you learn how to find selectors if that’s something you’re interested in:
http://en.support.wordpress.com/custom-design/how-to-find-your-themes-css/Beyond that, the first best place to ask for theme help is from the theme author directly. Some theme authors do support on a volunteer basis, some do not, and some provide paid support options. Check with your theme’s author if you want to find out more. If you can’t find help through the theme author, the link to the themes forum in the WordPress.org site is the next best route. If possible, include a link to the site where the problem is showing. If the site is not live yet, note what theme you are using and include an example HTML snippet (or whole page) from one of your pages. Use a site such as http://pastebin.com/ to post large code examples.
- The topic ‘How do I adjust the line height in the body of a post?’ is closed to new replies.