Title: Align post heading
Last modified: December 16, 2018

---

# Align post heading

 *  Resolved [billblast104](https://wordpress.org/support/users/billblast104/)
 * (@billblast104)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/align-post-heading/)
 * I want to align my post heading center and I added this CSS:
 * header h1.entry-title {
    text-align: center; font-weight: bold !important; }
 * It worked initially but when I added more CSS afterward it went to default and
   aligned to the left. Should I just re-add the CSS?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Falign-post-heading%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 12 replies - 1 through 12 (of 12 total)

 *  [Leo](https://wordpress.org/support/users/leohsiang/)
 * (@leohsiang)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/align-post-heading/#post-10995676)
 * Hi there,
 * It’s likely that the new CSS you’ve added has some syntax errors which stops 
   the CSS below the error from executing.
 * You can use a service like this to check: [https://jigsaw.w3.org/css-validator/](https://jigsaw.w3.org/css-validator/)
 * Hope this helps!
 *  Thread Starter [billblast104](https://wordpress.org/support/users/billblast104/)
 * (@billblast104)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/align-post-heading/#post-10995770)
 * [@leohsiang](https://wordpress.org/support/users/leohsiang/) I don’t have a clue
   at exactly what I’m looking at…lol I got the CSS from a post in here while looking
   for the alignment issue. It listed 9 warnings. This is the link that was generated
   when I put in the CSS starting right after the CSS in my post:
 * [http://jigsaw.w3.org/css-validator/validator$link](http://jigsaw.w3.org/css-validator/validator$link)
 *  [Leo](https://wordpress.org/support/users/leohsiang/)
 * (@leohsiang)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/align-post-heading/#post-10996006)
 * You need to make sure things like every line has a `;` to close and all `{` has
   a `}` to go with.
 *  Thread Starter [billblast104](https://wordpress.org/support/users/billblast104/)
 * (@billblast104)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/align-post-heading/#post-10996095)
 * Ok Leo let me see if I can figure this out…thanks a million
 *  Thread Starter [billblast104](https://wordpress.org/support/users/billblast104/)
 * (@billblast104)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/align-post-heading/#post-10996114)
 * It seems to me that line has what it’s supposed to have:
 * header h1.entry-title {
    text-align: center; font-weight: bold !important; }
 * .inside-header {
    display: -webkit-box; display: -ms-flexbox; display: flex; -
   webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction:
   column; flex-direction: column; }
 * .site-logo {
    -webkit-box-ordinal-group: 2; -ms-flex-order: 1; order: 1; }
 * .site-branding {
    -webkit-box-ordinal-group: 3; -ms-flex-order: 2; order: 2; }
 * .site-header {
    position: sticky; top: 0; }
 * #site-navigation {
    position: sticky; top: 165px; }
 * [@media](https://wordpress.org/support/users/media/) (max-width: 768px) {
    .site-
   header, #site-navigation { position: relative; top: auto; } }
 *  [Leo](https://wordpress.org/support/users/leohsiang/)
 * (@leohsiang)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/align-post-heading/#post-10996144)
 * I can see the code working:
    [https://www.screencast.com/t/sx8FhvLM](https://www.screencast.com/t/sx8FhvLM)
 *  Thread Starter [billblast104](https://wordpress.org/support/users/billblast104/)
 * (@billblast104)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/align-post-heading/#post-10996267)
 * I see that but for some reason, it’s still aligned to the left when I check it
   in the customizer and when I check the actual site. I’ll just delete the code
   and add it again to see if that works on my end…as always thanks a million for
   you help
 *  [Leo](https://wordpress.org/support/users/leohsiang/)
 * (@leohsiang)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/align-post-heading/#post-10996436)
 * So does it work for you on live site?
 * I just checked again and it’s working.
 * Are you referring to the title in blog/archive page or single post?
 *  Thread Starter [billblast104](https://wordpress.org/support/users/billblast104/)
 * (@billblast104)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/align-post-heading/#post-10996781)
 * When I check on my laptop and iPad the live site it is not aligned to the center.
   As you see I don’t have a home page but only 1 blog post thus far, so I’m not
   sure if that is considered a single post. Yes, I’m referring to the title in 
   the blog post.
 *  [Leo](https://wordpress.org/support/users/leohsiang/)
 * (@leohsiang)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/align-post-heading/#post-10998557)
 * Maybe try this CSS as well:
 *     ```
       h2.entry-title {
           text-align: center;
           font-weight: bold;
       }
       ```
   
 *  Thread Starter [billblast104](https://wordpress.org/support/users/billblast104/)
 * (@billblast104)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/align-post-heading/#post-10998652)
 * @leohsiand Leo that worked for me right there…thanks again for taking time to
   help me out…One last question on this subject, will this CSS align all titles
   for any future posts?
 *  [Leo](https://wordpress.org/support/users/leohsiang/)
 * (@leohsiang)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/align-post-heading/#post-11000196)
 * It should 🙂
 * Glad I could help!

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Align post heading’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/generatepress/3.6.1/screenshot.
   png)
 * GeneratePress
 * [Support Threads](https://wordpress.org/support/theme/generatepress/)
 * [Active Topics](https://wordpress.org/support/theme/generatepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/generatepress/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/generatepress/reviews/)

 * 12 replies
 * 2 participants
 * Last reply from: [Leo](https://wordpress.org/support/users/leohsiang/)
 * Last activity: [7 years, 5 months ago](https://wordpress.org/support/topic/align-post-heading/#post-11000196)
 * Status: resolved