Web Programming

This part of my Web site is dedicated to articles and notes dealing with Web programming in general (those dealing with Delphi are located here).

When I started developing this Web site, I knew nearly nothing of HTML, PHP, Javascript and other Web related languages. Some notes I took are now available here.  Have fun :-)

Cascading Style Sheets

Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation semantics (the look and formatting) of a document written in a markup language [Wikipedia]. It is the result of past efforts by the Internet community to separate design from content and it has been very successful at doing it.

Dynamic cascading style sheets

However, CSS has some flaws, the most frustrating of which is that it does not have variable capability. This can be corrected using PHP: with PHP, you can design a CSS file with embedded PHP code. It works as long as the PHP variables it contains are initialized before the file is linked or if the file is included in the main PHP code and located in the <head> section of the page between <style> tags. In the article entitled Dynamic cascading style sheets - internal or external? I explain how I could pass the values of PHP variable to a linked CSS file containing embedded PHP code. The way this solution was integrated in the design of this web site is explained in the article entitled The anatomy of this web site.

Printing styles

Have you ever noticed a button "Click here for a printer-friendly version" which often appeared on Web pages with fancy visual designs? I did and wandered how authors did to achieve this. This page is the result of such curiosity. As a matter of fact, I found that such button was no longer necessary as most modern browsers support medium-specific style sheets. For more details on how to achieve it, see my page on Media and Style Sheets.

Configuring multi-sites under Apache and Wamp

As I wanted to host several web sites on my computer, I had to configure Apache and Wamp Server to accommodate multi-sites. The recipe for doing it is simple but you need to know how. You can follow how I did it here.