Applying Background Images Using CSS

A background image can be applied to any element using the following CSS declaration: background-image: url(image name); Shorthand Shorthand background declarations are written as: background: color image repeat attachment position; For example, the following code: p { background-color: #f00; background-image: url(background.gif); background-repeat: no-repeat; background-attachment: fixed; background-position: center; } would be written in shorthand as: p […]