# Does media queries work with flex box?

**URL:** <https://forum.freecodecamp.org/t/does-media-queries-work-with-flex-box/217537>\
**Category:** General\
**Created:** [August 13, 2018, 11:27pm UTC](https://forum.freecodecamp.org/t/does-media-queries-work-with-flex-box/217537 "2018-08-13T23:27:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![keenanmurray](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/keenanmurray/32/89411_2.png) [@keenanmurray](https://forum.freecodecamp.org/u/keenanmurray)\
**Post date:** [August 13, 2018, 11:27pm UTC](https://forum.freecodecamp.org/t/does-media-queries-work-with-flex-box/217537/1 "2018-08-13T23:27:44Z")

</div>

Hi All,  
I created my Survey Form Project and used flex box to center everything, love it. However, in codepen, when I resized the view window, making it smaller, I noticed the input boxes for the name and email are sticking out past the form edge.  
I tried adding a media query to have them resize to a smaller width if the screen width was under 900 px, but it didn’t seem to work.  
Any ideas?  
Here’s my codepen link:  
[Kee-Survey\_Form\_Project](https://codepen.io/keenanmurray/pen/pZZZNz?editors=1100)

---

<div class="post-metadata">

**Author:** ![shimphillip](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/shimphillip/32/158663_2.png) [@shimphillip](https://forum.freecodecamp.org/u/shimphillip)\
**Post date:** [August 13, 2018, 11:46pm UTC](https://forum.freecodecamp.org/t/does-media-queries-work-with-flex-box/217537/2 "2018-08-13T23:46:43Z")

</div>

You are giving inputboxes set width of 200px and that’s why. Go head and give them width:100%; So that It will just stretch to 100% within its container. 🙂

---

<div class="post-metadata">

**Author:** ![keenanmurray](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/keenanmurray/32/89411_2.png) [@keenanmurray](https://forum.freecodecamp.org/u/keenanmurray)\
**Post date:** [August 14, 2018, 1:15am UTC](https://forum.freecodecamp.org/t/does-media-queries-work-with-flex-box/217537/3 "2018-08-14T01:15:22Z")

</div>

Thx, again! Works great.

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 17, 2021, 8:17pm UTC](https://forum.freecodecamp.org/t/does-media-queries-work-with-flex-box/217537/4 "2021-01-17T20:17:37Z")

</div>

Closed on January 17, 2021, 8:17pm UTC


