For this assignment, I just tried to make the front end a bit more readable. With the original code, every time a message was sent, an errant ‘0’ was being added. I couldn’t precisely figure out which line of code was making it do that, but I isolated the chunk of code causing that. I also wanted to have each message print to a new line, so I ended up having to modify that chunk any way.
I moved the input to the bottom of the window, and created its own div that always floated right at the bottom. The div that contains the list elements is now contained to 98% of the window (so that a message won’t print behind the input box) and it also creates a scroll bar as soon as it overflows. I tried to figure out how to automatically scroll to the bottom of the window, but was unsucessful.
I ended up using list elements in order to get the messages to print to a new line, as I coudln’t figure out how to inject a linkbreak of newline character. I them styled them with no list style so that there were no bullet points.
Here is the code: