Blog
-
Animated Glowing Lines in Canvas
I spent a little bit of time last night playing around with the new HTML5 canvas and seeing if I could create a realistic glowing line that moved around on the screen. My efforts can be found at the end of this article, but here is a screenshot of it: The code itself is fairly straight-forward. A few random parameters are first set up to determine the colour of the line, as well as it's start and…
-
Getting the most out of CSS selectors
Selectors in CSS are one of the most powerful and useful features you have at your disposal, and yet seem to be little used to its potential. Complex selectors solve the problem of targeting specific elements on a page (and in some browsers, elements that fall under certain conditions as well) One alternative to selectors which some developers find popular is to give every element that needs to be…
-
Fixing the Headers Already Sent Error
This is probably the single most frequent error I've seen come up as part of a question on mailing lists and forums, usually when one moves a script from a more lenient server to one that is more strict in its error reporting. The issue is caused by some call to header() after some output is sent to the browser. What can be sometimes difficult to understand for programmers new to PHP is that HTML…