Javascript: Styling my div question

I'm trying to recreate parts of what I wrote in HTML/CSS: https://jsfiddle.net/6L07k404/ using Javascript only

What I have so far: https://jsfiddle.net/ttp12pbb/ (and it seems to have problems)

It seemed to have worked fine up until line 76. What I'm trying to recreate is that structure in my first link. I have a daddy-container which has three containers in them, and each container has some more stuff in them.

Before line 76, it was working fine because I had gotten used to the process of: making the variable and element, styling it, and then appending it, then appending the bigger thing to the body.

So do I have the use of Object.assign... wrong? How can I fix it? I'm kind of a noob here so please be gentle.

Posted Mar 12, 2018, 9:28 PM UTC

19
Loading comments…