- This topic has 7 replies, 3 voices, and was last updated 5 years, 4 months ago by
David.
-
AuthorPosts
-
November 12, 2020 at 1:47 am #1527889
Alexandra
Hey guys!
Is there a way to have the h2 titles display centered on top of featured images in Archive pages instead of above or below?
I would also need a slight overlay on those featured images in order to properly display the titles in white.What I would need: http://prntscr.com/vhvssp
Thank you so much!
November 12, 2020 at 7:48 am #1528542David
StaffCustomer SupportHi there,
try this CSS:
.generate-columns .inside-article { position: relative; } .generate-columns .post-image+.entry-header { position: absolute; top: 50%; left: 0; } .generate-columns .post-image+.entry-header a { color: #fff; }November 12, 2020 at 11:23 am #1528828Alexandra
Hi, David!
Thank you so much for the CSS!
I’ve tried it and this is the result: https://alex.bandiwork.dev/category/articole-diverseThe titles were not vertically aligned center, so I tried adding
h2.entry-title { text-align: center; }but it seems to align only titles with multiple rows. The titles that are short enough to fit on just one row are aligned left.
I would also need an overlay on the images, because the text is not readable without it.
If you have any ideas, please let me know.
Thank you so much!Alexandra
November 12, 2020 at 7:41 pm #1529184Elvin
StaffCustomer SupportHi,
You can add overlay to your post images by adding this CSS:
.post-image { position: relative; } .post-image:before { background-color: rgba(25,25,25,0.5); height: 100%; width: 100%; content: ""; display: block; position: absolute; } .post-image a { line-height: 0px; display: block; }Adjust the
background-color:to your preference.November 12, 2020 at 8:48 pm #1529226Alexandra
Hi Elvin!
Thank you so much for the overlay CSS! I got it to work! 🙂The only issue remaining is the alignment of one-row titles.
Please see here: https://alex.bandiwork.dev/category/articole-diverse
Only titles with multiple rows are aligned center. The titles that are short enough to fit on just one row are aligned left.Is there any way to fix that too? I would need all titles to be aligned center, if possible.
Thank you so much!November 13, 2020 at 3:19 am #1529528David
StaffCustomer SupportChange this CSS:
.generate-columns .post-image+.entry-header { position: absolute; top: 50%; left: 0; }to:
.generate-columns .post-image + .entry-header { position: absolute; top: 50%; left: 50%; transform: translateX(-50%); width: 100%; padding: 0 10px; }November 13, 2020 at 5:51 am #1529669Alexandra
That sealed the deal! 😀
Thank you so much, David!!November 13, 2020 at 7:32 am #1530033David
StaffCustomer SupportGlad we could be of help
-
AuthorPosts
- You must be logged in to reply to this topic.