KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Non-obtrusive CSS modifications
PRODUCT: 4D Web 2.0 Pack | VERSION: 12.1 | PLATFORM: Mac & Win
Published On: March 14, 2011

CSS allows for a specific style set to be declared multiple times, and every subsequent declaration only modifies styles that are declared. This can be used to modify CSS on a web page without affecting the original.

For example, this style sets the background color, and color of the text for the entire page:

body {
color: #555;
background-color: blue;
}


To change the background color only in specific page instances, and leave the original untouched, append this CSS anywhere below the original "body" style declaration:

body {
background-color: yellow;
}


End result is yellow background color, but text color from first declaration (#555) is still respected.