css - white-space: nowrap and children with 100% width -


i have text inputs (its count may various), need place them in div, stretch on width in 1 line.

<div>     <input type="text" />     <input type="text" />     <input type="text" /> </div>  div {     width: 300px;     white-space: nowrap; }  input {     width: 100%;     display: inline-block; } 

jsfiddle

but it's not working expected. don't want set inputs' width manually (in px). possible?

assuming trying have inputs stretch equally in accordance page.

it's matter of extending fluid size of container, div, applying same fluid size inputs (assuming each equal) setting size 33%. in turn stretch full width of div, stretch full width of container (or page) it's in.

div {      width: 100%;      white-space: nowrap;  }    input {      width: 33%;      display: inline-block;  }
<div>      <input type="text" />      <input type="text" />      <input type="text" />  </div>


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -