Mam na swojej stronie "liste" z prostokątnych głównych divów. Z głównego diva jest możliwość żeby pod nim wysuneły sie 2 dodatkowe divy po kliknięciu przycisku ( JS).
I chodzi mi o to żeby ten div główny przesunął sie w dół gdy z powyższego diva głównego wysuną się dodatkowe. Troche namieszałem ;D.Czy ktos ma jakis pomysł?
<html> <head> <link rel="stylesheet" href="stajl.css"/> <script type="text/javascript"> <!-- function pokazAlboUkryj(co) { var obiekt = document.getElementById(co); if (obiekt.style.display == 'block') { obiekt.style.display = 'none'; } else { obiekt.style.display = 'block'; } } --> </script> </head> <body> <div class="main"> <div id="main2"> <div id="add"> </div> </div> <div id="main2"> </div> </div> </body> </html>
I CSS
.main { border-radius:7px; width:700px; height:100%; position:absolute; top:130px; left:385px; } #main2 { border-style: groove; border-width:1px; position:relative; top:50px; border-color: #1A2124; border-radius:4px; width:700px; height:45px; background-color:#262626; list-style-type:none; display: block; line-height: 50px; text-decoration: none; color:white; } #add { border-style: groove; border-width:1px; position:relative; top:45px; border-color: #1A2124; border-radius:4px; width:700px; height:45px; background-color:red; list-style-type:none; display: none; line-height: 50px; text-decoration: none; color:white; } #more-option { line-height:32px; text-align: center; width:40px; height:30px; border-style: groove; border-width:1px; border-radius: 7px; position:absolute; top:6px; right:20px; background:white; color:black; text-decoration: none; display:block; }