I have this code: http://jsfiddle.net/bUPWS/1/ but #div2 overflows #div1. How to bring the overflowed inputs next to the other ones?
<div id="div1">
<div id="div2">
<form>
<input/><br/><input/><br/><input/><br/><input/><br/><input/><br/><input/><br/><input/><br/><input/><br/><input/><br/><input/><br/>
</form>
</div>
</div>
#div1 {
width:400px;
height:100px;
border:1px solid red;
}
seeing your code i can say you are using
<br />tag so there is no possible way to bring your inputs next to each other. just remove each<br/>all your inputs will align properly.additionally you can use
min-heightfor your parent divdiv1if your inputs increases more than the limit of
100px heightyour parent div will adjust the height with respect to the inputs inside yourdiv2blockEDIT: However to explain my comment below i have updated your fiddle example you can check how we can achieve it using
<ul> <li></li></ul>tagsFiddle example
Code if here!
HTML
CSS