css - Display one DIV directly below dynamically changing DIV -
i have 1 div, changes height depending on data user enters it. once finished, click button , second div appears below data displayed in table. second div on page, it's opacity set 0.
as first div can anywhere 100px 1000px in height, how can second div display directly below it? ive been playing around margins , paddings can't second div appear dynamically in right spot.
preferably using css if thats option.
thanks.
you have make sure css position property set relative in divs. like:
html:
<div class="user_input_data"></div> <div class="results hidden"></div>
css:
div.user_input_data { position: relative; } div.results { position: relative; } div.hidden { display: none; } div.block { display: block; }
then you'd have remove hidden class , add block class show results.
Comments
Post a Comment