These are chat archives for FreeCodeCamp/HelpFrontEnd

Sep 2018
Sep 22 2018 00:27
yes, you can have two classes @AJ-Brommy
Nathan Hannig
Sep 22 2018 00:55


Anyone know why this doesn't pass
return [...state].push(action.todo)

But this does
return [...state, action.todo]

Sep 22 2018 00:58
@nathanhannig when you return [].push(), your returning what push returns
which is 1 (yea its stupid)
Nathan Hannig
Sep 22 2018 01:39
ahh thanks!
that is right, totally forgot that :O
good reminder
Sep 22 2018 02:03
np :D
Sep 22 2018 19:29
Hey there, I've encountered some odd CSS behavior that I don't understand. I created an example page containing three main parent elements - a header, a form, and a footer. Each of them contain child elements. Each of the three main elements have been given zero top and bottom margins and zero padding. I don't understand why enabling a CSS rule that gives the h1 or p child elements a margin of more than zero affects the margin of their parent elements, causing the header and/or footer to be set apart from the form rather than nestled right up against it as they are when I don't do that. I've put the example code into Codepen at in case anyone wants to play around with it.
AJ Brommy
Sep 22 2018 22:41
HEy @Ellyria , I've had some similar issues with margins, and somebody pointed me to look at "collapsible margins". It sounds like it could be this that is what you are missing? - good luck - let me know how you get on :)
By the way, too all those who have helped me, and whoever may be interested, I completed the Responsive Web Design section today and now have my certificate. I really want to thank the peeps here, especially those who have helped me. Thank you :)
AJ Brommy
Sep 22 2018 23:05
@Ellyria if you give the form element a padding of 1em and the p a margin of 1em. you may like the results? i'm not sure if that is technically the correct way to do it. but it works for me. but the link i sent will help with understanding that.