To view in action, follow this link:




Abuses PHP, Javascript, HTML and CSS to create multitudes of layered text in gradations of colour and size.
PHP + Javascript + CSS + HTML
October 2008, October 2011

The CSSNAKETRIX is a generator of visual-poetry-like displays of mulit-layered text and characters first implemented in October 2008. The original PHP implementation ran server-side and at times generated 750kb of HTML and served it over the internet. In October 2011 however, I finally addressed my concerns (however valid/invalid they may be) about the potential strain placed on the server and transferred the HTML generation to client-side (ie in your webbrowser) by porting it to Javascript.

Additionally I also fixed bugs caused by my previously hap-hazzard approach to line endings and other special characters that must be handled properly when working with PHP, HTML, and Javascript.

Original Description:

The CSSNAKETRIX randomly layers text in varying shades of colour and size as a page in your web browser. The text is contained within a 'snktrx' file and may be no more than 40 characters by 20 rows. The snktrx file also specifies ranges for the randomness of colour values, font sizes, and repetition and positioning.

The visitor to the CSSNAKETRIX may choose a snktrix file, or have one come up at random. The parameters of the file may be customized and a new file created, or, the exact values used to generate a CSSNAKETRIX may be edited and the result exported as an PNG image file.

The project began just as experiments after finishing D0M1N8 OR SUBM17 and wanting to create symetrical ASCII-text patterns. Initially, only non alphabetical characters were used, what was displayed was more visual, but after a short while I realised the possibility for creating short statements using it and envisioned a gallery of statements, and to allow users to create their own.

After posting a link to the first version to Dave Miller replied back suggesting it might export the display to an image. This posed several problems for the first version, namely, that everything was random.

The name came from the first experiments which suggested a snake shape (without the meandering form) and a certain variable having been named 'matrix' (not necessarily in reference to the film).

See also the journal entry, CSSNAKETRIX v2, containing information about some of the CSSNAKETRIX's limitations.

This version has a few bugs, the worst of which is certain characters entered into the matrix customization form will be deleted, This arose from problems dealing with the different line endings (in text files) between Windows and Unix/Linux systems.

If I ever work on a next version, the above bug will be fixed, and perhaps some method of making the snake-like forms meander down the page.

DISCLAIMER: The opinions and attitudes of James W. Morris as expressed here in the past may or may not accurately reflect the opinions and attitudes of James W. Morris at present, moreover, they may never have.


this page last updated:6th May 2013 (C) 2003 - 2017 James W. Morris

script time:0.0363