How can I center the featured images of my post
-
Hello,
Currently, my featured images are aligned left.
How could I align them in the centre?Thanks a lot for your help
Loren
The blog I need help with is: (visible only to logged in users)
-
Hello there!
Dropping this code in your custom CSS area should do the trick:
.single-post .wp-post-image { margin: 0 auto .5em !important; display: block; }Let me know if that doesn’t work!
Sage -
Hi Sage,
Thanks a lot, it works perfectly. However, would you have a trick in your hat to avoid using !important?
I’ve been told to try to avoid it when possible.Thank you very much
-
Hey there!
Sorry about that, I generally try to take it out if possible, this was just a leftover of my playing around with it. If taking out the !important doesn’t catch hold, then something like this where it narrows down the selectors a bit more might work better:
.single-post .type-post .wp-post-image { margin: 0 auto .5em; display: block; }Hope that helps!
Sage -
-
- The topic ‘How can I center the featured images of my post’ is closed to new replies.