Showing posts with label css. Show all posts
Showing posts with label css. Show all posts

CSS Colors: Take Control Using PHP


While many web sites use powerful programming environments to create HTML, these same tools are usually ignored when it comes to creating Cascading Style Sheets (CSS). This article describes how to take control of your colors in CSS using PHP. You will learn how to:

  • Centralize your color definitions using variables.
  • Separate presentation and content by referring to colors using abstract names such as base and highlight.
  • Automatically generate a color gradient from a single base color:
    -5
    -4
    -3
    -2
    -1
    0
    +1
    +2
    +3
    +4
    +5
  • Automatically adjust the contrast of foreground colors so they can viewed on top of your background colors:
    -5
    -4
    -3
    -2
    -1
    0
    +1
    +2
    +3
    +4
    +5

Learn CSS Positioning in Ten Steps

his tutorial examines the different layout properties available in CSS: position:static, position:relative, position:absolute, and float

1. position:static

The default positioning for all elements is position:static, which means the element is not positioned and occurs where it normally would in the document.

Simple 2 column CSS layout

This is a tutorial on how to use CSS to create a simple two column layout.


The layout consists of a header, a horizontal navigation bar, a main content column, a sidebar, and a footer. It is also horizontally centered in the browser window. A pretty basic layout, and not at all difficult to create with CSS once you know how to deal with the inevitable Internet Explorer bugs.


To see the full CSS used for each step, view source on the example documents.