+ 3

Why does this code removes the div child when click happens on the right side of div element but not when clicking below [SOLVED

https://code.sololearn.com/WTxjYVqQY3bQ/?ref=app

2nd Jun 2020, 7:20 PM
Abhay
Abhay - avatar
5 odpowiedzi
+ 1
Abhay Yes. But add border to body and look at result.
2nd Jun 2020, 7:38 PM
Leonid Selivanov
Leonid Selivanov - avatar
+ 2
I think you are right but using background-color for body tag applies to whole page,so anywhere click happens should remove the div element why only at the right side of it !
2nd Jun 2020, 7:34 PM
Abhay
Abhay - avatar
2nd Jun 2020, 7:40 PM
Abhay
Abhay - avatar
+ 1
Because at the bottom where there is no gradient even the body tag has ended I think.
2nd Jun 2020, 7:32 PM
Leonid Selivanov
Leonid Selivanov - avatar
0
Your style contents: #remove{ height:100px; ...
2nd Jun 2020, 7:34 PM
Leonid Selivanov
Leonid Selivanov - avatar