3

I'm trying to make the following sign up box fluid responsive in CSS.

Here is an example: http://cssdesk.com/aYLwW

I would like the input field width to be "flexible" and shrink depending on the page.

You can see from the example when I shrink the window, the button eventually drops down below the input field.

With this in mind, what should I set my input#iiihuu-iiihuu field width to be to allow the input field to gracefully resize without any bumpage?

Many thanks for any pointers :-D

michaelmcgurk
  • 6,367
  • 23
  • 94
  • 190

2 Answers2

5

Give a min-width:550px; to the div containing the text-box and button. Your control will not break then.

Working ex. here http://cssdesk.com/dUjxF

As the definition says min-width sets a min-width to the element, it doesn't go below that size under any circumstances.

Ashwin Singh
  • 7,197
  • 4
  • 36
  • 55
  • Thank you, Ashwin. Is there a way to butt the input field up with the button? You'll notice that the button still drops below the input field. Should I remove the `width: 450px` declaration? Thanks again – michaelmcgurk Jul 06 '12 at 11:18
  • @mcgarriers Oops posted the wrong link, changed it, have a look again. http://cssdesk.com/dUjxF – Ashwin Singh Jul 06 '12 at 11:21
  • your cssdesk link doesnt actually make the input field responsive. Typing in the box, results in the text stopping a portion of thw way accross. Your contained dev is responsive - misleading. – Rhyso Aug 20 '13 at 13:14
  • The OP is satisfied with the solution. – Ashwin Singh Aug 20 '13 at 14:57
4

You can change the css widths to percent based. See here

renick
  • 3,873
  • 2
  • 31
  • 40