Title: Wrap Post Image Inside DIV
Last modified: August 19, 2016

---

# Wrap Post Image Inside DIV

 *  [Lee Peterson](https://wordpress.org/support/users/lpeterson23/)
 * (@lpeterson23)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/wrap-post-image-inside-div/)
 * 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!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Clayton James](https://wordpress.org/support/users/claytonjames/)
 * (@claytonjames)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/wrap-post-image-inside-div/#post-1209669)
 * Would anything here be useful? You can just tweak the css to fit your need.
 * [http://codex.wordpress.org/CSS#WordPress_Generated_Classes](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](http://wordpress.org/extend/themes/atahualpa)
   and previewing in Firefox.
 *  Thread Starter [Lee Peterson](https://wordpress.org/support/users/lpeterson23/)
 * (@lpeterson23)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/wrap-post-image-inside-div/#post-1209784)
 * 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. 😛
 * 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.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Wrap Post Image Inside DIV’ is closed to new replies.

## Tags

 * [custom function](https://wordpress.org/support/topic-tag/custom-function/)

 * 2 replies
 * 2 participants
 * Last reply from: [Lee Peterson](https://wordpress.org/support/users/lpeterson23/)
 * Last activity: [16 years, 9 months ago](https://wordpress.org/support/topic/wrap-post-image-inside-div/#post-1209784)
 * Status: not a support question

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
