Css to centre post title and date?
-
Hi guys can anyone help? I have a code that works right away to centre my post titles however the dates are left on one side of the post and I’d also like those centred. How do I do this what can I add? This is the title centring code that works for me –
#page-title, article.post .entry-header h1.entry-title, article.page .entry-header h1.entry-title {
text-align: center;
}The blog I need help with is: (visible only to logged in users)
-
Hey @cheskaaanels
It seems like your post titles aren’t centered, only the content of your post.
If you want to center both the titles and the dates, just add this to your
.entry-headerclass:.entry-header{ text-align: center; }Here is a print so you can check it out: http://prntscr.com/cvcajf
If you have any other questions, feel free to ask :)
Best !
Darlan Ricardo -
Thank you that seems to work only for the title but not the date or comments underneath that?
-
Thank you so much for your help so far, @darlanric!
@cheskaaanels: You can centre the meta information by adding , .entry-meta just after .entry-header in the original CSS provided to you:
.entry-header, .entry-meta { text-align: center; }Hope that helps out. :)
-
-
- The topic ‘Css to centre post title and date?’ is closed to new replies.