LED Scroller

Recommend this page to a friend!

      JavaScript LED Text Scroller  >  All threads  >  LED Scroller  >  (Un) Subscribe thread alerts  
Subject:LED Scroller
Summary:Make Full Width
Messages:2
Author:Frankie P
Date:2016-11-07 15:01:15
 

  1. LED Scroller   Reply   Report abuse  
Picture of Frankie P Frankie P - 2016-11-07 15:01:15
How can I make LED Scroll full window width?
CSS isn't working for some reason.

  2. Re: LED Scroller   Reply   Report abuse  
Picture of Joseluis Laso Joseluis Laso - 2016-11-08 08:44:52 - In reply to message 1 from Frankie P
Hello,

I think with CSS could be a little complex.

But I don't see the problem to detect the effective width of the window once the DOM is loaded and then calculate the number of chars you want to show (remember the matrix is composed by separate chars)

$(function(){
var width=$(window).width(); // look for the right syntax document/window/body, and width, getWidth, whatever
var chars = width/widthOfEachChar;
// then call the constructor of LedMatrix
});

I don't know if I made myself understood ?