I have created a page with a form. I want the form to have a defined height, so I put a div with a defined height in the form. If there is insufficient space for the inputs, I want a vertical scroll bar. I want this overflow thing only for the vertical dimension, not for the horizontal one, so I set width to auto.
Now I see that I also get a horizontal scroll bar with the vertical one. My conclusion is that Firefox calculates the auto width without taking the vertical scroll bar into consideration.
This may be right, or it may be wrong. To find out, I had different browsers vote on the issue. Result:
- Firefox and Edge both show the horizontal scroll bar
- Chrome and Opera don't show the horizontal scroll bar
Does anyone know if the standards have a clear definition of how to calculate auto width?
Picture: http://uelissimo.bplaced.net/temp/autowidth.png
Code: http://uelissimo.bplaced.net/temp/autowidth.html
Note: The picture shows the Firefox way of rendering.
If you click on the link with the code, the display depends on your browser, as explained above.