Title: element max width
Last modified: February 1, 2021

---

# element max width

 *  Resolved [rabaj1](https://wordpress.org/support/users/rabaj1/)
 * (@rabaj1)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/element-max-width/)
 * I made the add to cart button have a max width of 400px and a min width of 250px.
   However it always stays at the min width, even when there is room to expand, 
   it never changes. How do I make the button actually shrink and expand according
   to page size and not just stay constant?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Felement-max-width%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Vlad](https://wordpress.org/support/users/vladytimy/)
 * (@vladytimy)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/element-max-width/#post-13981512)
 * Hi, [@rabaj1](https://wordpress.org/support/users/rabaj1/)
 * First, I would remove that min-width of 250px. Then, try adding this in Dashboard–
   Appereance – Customize – Additional CSS in the [Customizer](https://wordpress.org/support/article/appearance-customize-screen/)
 *     ```
       button.single_add_to_cart_button {
           width: 70%;
       }
       ```
   
 * You can try different percents and see what fits you better.
    You can learn how
   to use the [Chrome Developer Tools](https://developers.google.com/web/tools/chrome-devtools/)
   or [Firefox Developer Tools](https://developer.mozilla.org/en-US/docs/Tools) 
   to help you see and test changes to your CSS.
 * Hope this helps,
    Kind regards!
 *  Thread Starter [rabaj1](https://wordpress.org/support/users/rabaj1/)
 * (@rabaj1)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/element-max-width/#post-13983119)
 * I see, thank you!

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

The topic ‘element max width’ is closed to new replies.

## Tags

 * [additional css](https://wordpress.org/support/topic-tag/additional-css/)
 * [css](https://wordpress.org/support/topic-tag/css/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [rabaj1](https://wordpress.org/support/users/rabaj1/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/element-max-width/#post-13983119)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
