diff --git a/index.html b/index.html index 5f2767e9..483cf8f0 100644 --- a/index.html +++ b/index.html @@ -11,6 +11,7 @@ #messages { list-style-type: none; margin: 0; padding: 0; } #messages li { padding: 5px 10px; } #messages li:nth-child(odd) { background: #eee; } + #messages { margin-bottom: 40px } @@ -29,6 +30,7 @@ }); socket.on('chat message', function(msg){ $('#messages').append($('
  • ').text(msg)); + window.scrollTo(0,document.body.scrollHeight); });