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).
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.
|Welcome to CSS||Articles dealing with CSS.|
|Tips and Tricks for the Web||This page contains various tips and tricks for web programming in general. Very often, you are faced with an unexpected problem. Printing background colors was the first. Preventing submitter bots from feeding spam into the form of a blog was the second.|
|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 this article I explain how I could pass the values of PHP variable to a linked CSS file containing embedded PHP code.|
|CSS variables are on the horizon!||For a long time, the use of variables in CSS was a desired web programmers capacity. Here they are on the horizon in the landscape of the CSS standard (still only a proposal). It will allow a large number of simplifications in the code and eliminate redundancies that plague CSS files.|
|Wide Content breaks my layout||In exceptional circumstances, when a snippet of code is comprised of a long paragraph and when this snippet is contained in a DIV/CSS HTML "liquid" structure, my code highlighter breaks the layout of the page by overflowing the whole page to the right of the screen and generating a horizontal scroll bar. Using CSS like overflow:auto;, white-space: pre-wrap; and word-wrap: break-word; is no cure. A jQuery/CSS solution is presented that cures the problem but its causality is not known.|
|A PHP way to simulate CSS Variables||Here, I describe a scheme using PHP to implement CSS variables. A pseudo-CSS file with the .php extension is used. It contains PHP code as well as standard CSS statements. The PHP code extracts values from a cookie and various CSS statements are set by PHP code that assign them user defined values. Its implementation is relatively simple and it prevents redundancies in the file.|
|Media and Style Sheets||This page describes how to separate cascading style sheets used for printing from those being used for the screen thus getting rid of "Click here for a printer-friendly version" notices.|
|Tooltips||This article describes how the tooltips are implemented on this Web site. The browser-generated tooltips are described and a method of generating them with CSS-only was developed. This method tended to clip the tooltip when the link was next to an edge of the page so that a DHTML-based method was developed. This last method is now used throughout the site.|
|Problem with jQuery Chili printing with line-numbering "on"||This page describes a problem that I have had printing pages comprised of snippets of codes highlighted by jQuery Chili with line-numbering "on". In this case, the printout is simply unreadable since the useful content extends far beyond the edge of the printed page and is clipped.|
|Configuring multi-sites under Apache and Wamp||This article describes how I proceeded to host multi-sites under Apache and Wamp Server on my computer.|
|Validating email addresses||This article provides some background of the internet protocols with particular emphasis on the SMTP protocol that is used to send mail. It results from the requirement for visitors to my blog leaving a comment to provide at least a valid email address. The result is an email address validator tool which validates but is short from verifying. The verification of the address requires probing ports 25 or 587 which is not welcome by servers (I came very close to being black-listed). I found an easy solution: to subscribe to an e-mail validator.|