Welcome to CSS
Georges Trottier
October 15th 2013

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.

In this section of the site, I present various articles that deal with CSS.

List of articles on CSS on this site:

CSS tips and tricks This page provides various tips and trick that apply to CSS styling.
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.
Wide content breaks
my layout

October 3rd 2014
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.
Dynamic cascading style sheets - internal or external?
August 9th 2010
updated October 16th 2014
This article presents an easy way of using dynamic cascading style sheets that are linked to Web pages rather that used in-line. Session variables are used to inform the dynamic cascading style sheet of the color themes that are selected by the site administrator. Four color themes with three color shades are used on this Web site.

Update: The user interface of this site has been modified since this page was published so that the set of buttons allowing the user to switch theme no longer exists on the pages of this web site. I have added a set of buttons to implement this functionality (on this page only). I also made some editorial changes.
CSS variables are on the horizon!
January 20th 2014
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.
A PHP way to simulate CSS Variables
October 16th 2014
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 rules. 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.

Questions or comments?
Last modified: October 24th 2014 11:07:18. []