i need adjust left div's height automatically right div height increase.
my css , html code here
.left { margin:auto; float:left; width:30%; height:auto; background:#000; } .right { margin:auto; float:left; width:70%; height:auto; background:#eee; } <div class="left">sgdsfhdh</div> <div class="right">lorem ipsum dummy text of printing , typesetting industry. lorem ipsum has been industry's standard dummy text ever since 1500s, when unknown printer took galley of type , scrambled make type specimen book. has survived not 5 centuries, leap electronic typesetting, remaining unchanged. popularised in 1960s release of letraset sheets containing lorem ipsum passages, , more desktop publishing software aldus pagemaker including versions of lorem ipsum.</div> <div style="clear:both"></div>
you can achieve just css. need use display:flex;
, need 1 div
wraps left
, right
div/class.
.wrap { display:flex; } .left { width:30%; background:#000; } .right { width:70%; background:#eee; }
<div class="wrap"> <div class="left">sgdsfhdh</div> <div class="right">lorem ipsum dummy text of printing , typesetting industry. lorem ipsum has been industry's standard dummy text ever since 1500s, when unknown printer took galley of type , scrambled make type specimen book. has survived not 5 centuries, leap electronic typesetting, remaining unchanged. popularised in 1960s release of letraset sheets containing lorem ipsum passages, , more desktop publishing software aldus pagemaker including versions of lorem ipsum.</div> <div style="clear:both"></div> </div>
also if still want jquery way.
Comments
Post a Comment