2

I have problem because i have one div from left of the right div, with registration fields. Problem is that sometimes someone could provide not proper values to registration form and then <form> and containing it rightDiv getting bigger height but this height is not specified explicitly. How can i change, in this case, height of leftDiv to height of rightDiv, after height of rightDiv was changed? example html:

<div id="leftDiv" style="float: left">
    <p>Hello</p>
</div>
<div id="rightDiv">
    Here are registration related inputs fields.
</div>

Registration is not via ajax.

ty812
  • 3,293
  • 19
  • 36
krzyhub
  • 6,285
  • 11
  • 42
  • 68

1 Answers1

2

Use a wrapper and display:inline-block. This should work:

<div class="wrapper">
 <div style="display: inline-block; width:50%">
  <p>Hello</p>
 </div>
 <div style="display: inline-block; width:50%">
  Here are registration related inputs fields.
 </div>
<div>
home
  • 12,468
  • 5
  • 46
  • 54