I am making a live twitter feed using nodejs and websockets. I am trying to get the display to automatically scroll to the left once the browser window is full and stop it overflowing vertically.
The project will be displayed on a fixed screen with so theres no need to worry about the browser resizing. Here's what I have so far:
socket.onmessage = function(message) {
var d = JSON.parse(message.data);
console.log(message.data);
var obj = {
text: d.text,
imgURL: d.imgURL,
}
updateView(obj);
}
var updateView = function(obj) {
container.append("<span class='inner'><img class='profile' src=" + obj.imgURL +
"></img><p>" + obj.text + "</p></span>");
}
span#container {
width: 1450px;
min-width: 100px;
min-height: 100%;
overflow-y: hidden;
overflow-x: scroll;
}
span.inner {
float: left;
border: 1px #333333 solid;
width: 469px;
height: 450px;
}
<div id="container"></div>