Site logo

Archived topic

How to center H1 and the entry-meta for specific post

5 replies · Started by pancakebg on November 23, 2018

Viewing posts 1–6 of 6

Hey guys, i need your help.

I need to center the title for specific blog post and the entry-meta, but only inside that post not in the archive.

Also, is there a way to add padding on left and right only for the text inside these posts?

Hi there,

you can center the entry header on single posts with this CSS:

.single-post .entry-header {
    text-align: center;
}

Are you wanting to apply that to certain posts but not all? If so how many and is there any easy way of identifying them, like the same category or tag?

Actually it looks great on all of the posts so the CSS above is ok.

Is there a way to add padding to .entry-content without this effects the tablet and mobile version of the blogpost.

If you check the post i added some css, but on mobile looks bad. Is there some "max-widht" to add to the css so i can have it only on desktop?

#post-21 .entry-content {
padding-left: 125px;
padding-right: 125px;
}

You can wrap your CSS inside a media query like so:

@media (min-width: 769px) {
    #post-21 .entry-content {
        padding-left: 125px;
        padding-right: 125px;
    }
}

Thank you!

Works great

You're welcome

This archived topic is closed to new replies.