1

I am working on a web site (Bons Alunos).

On the page documents I have a search input.

When I resize the window to a smaller size the input becomes smaller as expected.

But when the window is really small the input stops resizing and the button on the right starts to get hidden.

Any idea what is wrong?

Thank you, Miguel

Miguel Moura
  • 36,732
  • 85
  • 259
  • 481
  • Could you post the code related to the search box, and anything you've tried. – Andrew Dec 22 '13 at 21:22
  • 1
    It looks like you have a min-width property set on the div that wraps the text input. – Andrew Dec 22 '13 at 21:22
  • Yes, I know I have that minimum size ... The question is why does the button gets hidden ... Shouldn't the button be inside the div? – Miguel Moura Dec 22 '13 at 21:33
  • Even if I have a minimum width the button should be inside the window ... the input would resize ... If I would have a minimum-width applied to the input that would make sense ... But not this – Miguel Moura Dec 22 '13 at 21:35

1 Answers1

2

the input and the button are enclosed in a fieldset, and the browser gives the fieldset a min-width. Either eliminate the fieldset, or add fieldset {min-width:0;} to your css

UPDATE Fieldset doesn't properly resize in Firefox. It's explained in this stackoverflow article:

<fieldset> resizes wrong; appears to have unremovable `min-width: min-content`

I suggest trying the url it recommends:

@-moz-document url-prefix() {
    fieldset {
        display: table-cell;
    }
}

If that fails, you may have to abandon fieldset.

Community
  • 1
  • 1
yitwail
  • 1,999
  • 3
  • 20
  • 27