Skip to main content
100%

how to put an image before page title in wordpress, with just css!

✓ Published0🌍 Public
Aandyreagan
Last edited Mar 17, 2015
Created on Mar 17, 2015

This example demonstrates how to position an image before a WordPress post title using only CSS, targeting the `header.entry-header` element. It shows the flower image displayed to the left of the `h1` title, with both vertically aligned via `display: table` and `table-cell`. The `:before` pseudo-element injects the image from a WordPress media URL using `content: url(...)`, while padding creates spacing between the image and title text. No JavaScript libraries are involved; the technique relies purely on standard CSS styling applied to the theme’s existing markup.

AI-generated description

Similar vizzes