Apply custom css to first image in post
I am building a site for a client in which they want the first image of every post to sit behind the post title (the title has a solid background to stand out from the image).
I have created a class for the image that pulls the image up and under the title and the class can be applied in the text editor. All the client has to do is add the desired image & use the tinyMCE image editor to apply the class.
However, the client wants multiple users to add blog posts & I am thinking that this step might be a little too much for them. I thought of using custom fields for the main image, however, I already have a bunch of custom fields and I think this might confuse users.
Is there anyway to apply a css class to the first image in a post? This would make the process much more painless as users would just have to upload their main image and the css would automatically position it where needed.
- The topic ‘Apply custom css to first image in post’ is closed to new replies.