WordPress.org

Ready to get started?Download WordPress

Forums

Wrap Post Image Inside DIV (3 posts)

  1. lpeterson23
    Member
    Posted 4 years ago #

    I'm trying to get rounded corners on images inside posts.

    Initially, my thought was to create a class of rounded on images and get it done through CSS. Safari does it just fine. However, Firefox does not support rounded corners on images... just block elements.

    So, my next thought was to wrap the images inside of a block element, then round the corners. What I would like to do is create a function that automatically does this for my client. Any image that is inserted within a post, whether it's in a Page or in a Post, should be wrapped in a block element and have a class of 'rounded', and will then have 10px rounded corners.

    I'm just a designer and front-end developer so creating a custom PHP function for this is a little over my head.

    Can someone give me a little guidance with this? Any help would be greatly appreciated.

    Thanks!

  2. ClaytonJames
    Member
    Posted 4 years ago #

    Would anything here be useful? You can just tweak the css to fit your need.

    http://codex.wordpress.org/CSS#WordPress_Generated_Classes

    The results of the captions/background with rounded corners can be seen by visiting a theme example and previewing in Firefox.

  3. lpeterson23
    Member
    Posted 4 years ago #

    ClaytonJames,

    Thanks for the suggestion.

    I believe the work-up would be more in the way of a custom WordPress function. I explored using captions to do this a few times, but that would require a caption to be entered. A blank caption is possible by inserting a space into the field, but that's not exactly professional. :-P

    I believe I will just suggest to the client that they round off the corners manually to retain the brand. This seems to be the easiest, quickest way.

    Thanks again.

Topic Closed

This topic has been closed to new replies.

About this Topic