+ 2

Last try to get some help..

Been screaming for 4hours- Help with div alignment Click the add(+) icon and enter a name. Then add a small div (+) icon and enter random data. When the new div is created it lowers from its place. Can anyone help me with that? https://code.sololearn.com/W5R6ph5J3KX3/?ref=app Update: I have given up for now. If you can solve the issue please let me know. Good night.

14th Oct 2018, 4:25 PM
Akib
Akib - avatar
6 Antworten
14th Oct 2018, 6:51 PM
Burey
Burey - avatar
+ 3
Debug your boxes you creating when the add function is executed, You will see it is not an fault is your javascript. The box you creating is a div. Therefore div must create a new line as parent or child. So lets take a look at your CSS. The box has an display of inline-block. There is your mistake. Remove that line and adjust the width and all will function normal. Hope this helps👍 https://code.sololearn.com/WsXio73UPWoW/?ref=app
14th Oct 2018, 6:40 PM
🌴Vincent Berger🌴
🌴Vincent Berger🌴 - avatar
+ 2
Akib Reza tbh it took me a while to figure it out as well 😅
14th Oct 2018, 7:50 PM
Burey
Burey - avatar
+ 1
Shouldn't line 64 be main_sec.appendChild(book_row); Instead of main_sec.insertBefore(book_row,main_sec.firstChild); ? or am i missing the question intent?
14th Oct 2018, 4:54 PM
Burey
Burey - avatar
+ 1
thanks a lot Burey. It was bugging me for a long time🦂
14th Oct 2018, 7:38 PM
Akib
Akib - avatar
0
No, not that. Once i have a row and try to add another div to the right its mis-aligns. Edit: see this screenshot https://nofile.io/f/o2WHXQjtn4k/Screenshot_20181014-230235.png
14th Oct 2018, 5:01 PM
Akib
Akib - avatar