QUERY LOOP Custom CSS: Overlay feature image on Posts Grid
-
Hi everyone!! As I’ve said, I’m using QUERY LOOP to create a posts grid. I want to overlay the title and excerpt of the post with the feature image. I know I have to write “position:absolute”, but I can’t complete the code correctly.
Someone gave me a code, which hasn’t been helpful. I tried to find the correct code using online CSS generators, but no luck.
.wp-block-post-content { position: absolute; bottom: 0; padding: 0 1em; color: white; background: linear-gradient(180deg, rgb(0 0 0 / 0) 0%, rgba(0 0 0 / 0.8) 100%); text-shadow: 0 0 10px black; }
The thing is, I’m creating this single page category grid so that you’ll always see the most recent posts. That means that whenever I upload a new post of said category, the grid will update automatically. It should look something like this, although there is no excerpt in this example:
I thought it would be easier to find the right code if I considered it as HTML, like when customizing a child theme. I was wrong!! Can someone tell me how I should proceed?
Thanks in advance!!
PS: Grid columns are the same width and all images are the same size.
- The topic ‘QUERY LOOP Custom CSS: Overlay feature image on Posts Grid’ is closed to new replies.