Title: Changing post width based on custom fields
Last modified: August 19, 2016

---

# Changing post width based on custom fields

 *  Resolved [hamburger](https://wordpress.org/support/users/hamburger/)
 * (@hamburger)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/changing-post-width-based-on-custom-fields/)
 * Hi,
 * I’m trying to achieve a system where I can enter in two values into the custom
   fields that change my post’s #content width.
 * 1) 490px
    2) 610px
 * But I’m currently unsure if this is even possible? Can custom fields edit/override
   css values? If so, does anyone know any places/tuts to read up on?
 * Many thanks.

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

 *  [s_ha_dum](https://wordpress.org/support/users/apljdi/)
 * (@apljdi)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/changing-post-width-based-on-custom-fields/#post-1383567)
 * Inline styles will over-ride anything in an external stylesheet as well as any
   previous declaration in the same file. Its possible. You insert a `style=".."`
   declaration in each post by modifying your Loop. You could also do it by adding
   a class for each size to the appropriate posts and then set the size for that
   class in the stylesheet. It would be easier to help if you could provide an URL.
 *  Thread Starter [hamburger](https://wordpress.org/support/users/hamburger/)
 * (@hamburger)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/changing-post-width-based-on-custom-fields/#post-1383769)
 * Hi apljdi, thanks for replying. 🙂
 * I understand what you mean although I’m very new to making websites. I’ll have
   a look at modifying the loop and I’ll do some research on this.
 * however if it is at all any help, here is the website I’m working on.
 * [http://www.mayrussell.com.au/index.php/projects/](http://www.mayrussell.com.au/index.php/projects/)
 * Each post depends upon how many images there are in the gallery. So I’m thinking
   that in my Custom Fields I have three options:
 * 1) 3 Image Page
    2) 4 Image Page 3) 5 Image Page
 * Thanks again for your help.
 *  [matt987](https://wordpress.org/support/users/matt987/)
 * (@matt987)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/changing-post-width-based-on-custom-fields/#post-1383770)
 * If I’m understanding what you’re trying to do correctly what you could do is 
   make custom post templates. This would make each post appear differently when
   on a single page.

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

The topic ‘Changing post width based on custom fields’ is closed to new replies.

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [custom fields](https://wordpress.org/support/topic-tag/custom-fields/)
 * [post width](https://wordpress.org/support/topic-tag/post-width/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [matt987](https://wordpress.org/support/users/matt987/)
 * Last activity: [16 years, 3 months ago](https://wordpress.org/support/topic/changing-post-width-based-on-custom-fields/#post-1383770)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
