tags:

views:

81

answers:

3

Which CSS property can be set for controls so that they won't look stretched in any browser? I am concerned about IE, FireFox, and Safari.

A: 
float:left;

makes it shrink-wrap same as position:absolute;

but all in all you will need to explain what you mean by stretchness?

YuriKolovsky
+2  A: 

alt text


Seriously, though, let's see if I can have a crack at getting you an answer you need.

The word "control" is quite strange here - I'll take it to mean any HTML form element. All form elements will not stretch (again, another strange word) to fill up the space given to them, except for the textarea element, because they are inline level elements, meaning the default display value is inline. This means that, without adding any code, your form element should not look "stretched" to begin with.

Different browsers have different default width for form elements. If you need them to be of the same width, you have to explicitly set them in your CSS. I hope this answers your questions, though clarifications would be nice...

Yi Jiang
A: 

max-width maybe? It's a pretty vague question to be fair.

fearofawhackplanet