Title: Resizing / max width image code problem
Last modified: August 19, 2016

---

# Resizing / max width image code problem

 *  Resolved [caffeinedreamer](https://wordpress.org/support/users/caffeinedreamer/)
 * (@caffeinedreamer)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/resizing-max-width-image-code-problem/)
 * Sorry, but I’m getting a bit of a problem with this code. While it does indeed
   resize large images that would otherwise break borders, it also resizes smaller/
   low res images to the max width too (unless, for some reason, they are captioned).
   Can anything be added to the code to sort out this issue?
 *     ```
       p img {
         width: 100% !important;
         height: auto;
       }
       ```
   
 * Site: [http://www.slickfilth.com](http://www.slickfilth.com)

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

 *  [Joseph](https://wordpress.org/support/users/jpe24524/)
 * (@jpe24524)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/resizing-max-width-image-code-problem/#post-1771331)
 * Try `max-width: 100%;` instead.
 *  Thread Starter [caffeinedreamer](https://wordpress.org/support/users/caffeinedreamer/)
 * (@caffeinedreamer)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/resizing-max-width-image-code-problem/#post-1771348)
 * Perfect Joseph – thank you!

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

The topic ‘Resizing / max width image code problem’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [caffeinedreamer](https://wordpress.org/support/users/caffeinedreamer/)
 * Last activity: [15 years, 6 months ago](https://wordpress.org/support/topic/resizing-max-width-image-code-problem/#post-1771348)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
