Stickies & Notes on CSS

CSS info, tips, code samples, etc.

What is the Syntax for CSS?:

CSS Syntax example:

body {
background: #DCDCDC
}

Basic CSS Syntax = selector {property: value}.

In the example at right, the syntax is define as follows:



Defining Colors in CSS:

In CSS, Use Hex Colors:

use this: #2F4F4F
instead of this: DarkSlateGrey

Define colors in hex code - NOT by color name.

There are colornames that are "supported by all major browsers" - in theory. However, it is my experience that in reality, this is not necessarily so.

To insure that defined colors display as consistently as possible - use hex.



CSS Positioning:

z-index Code example:

#leftcol1 {
position: absolute;
top: 65%;
left: 2%;
border: 1px outset #FFF;
width: 20%;
z-index:-1;
}

The z-index property 'Default' value is 0.

Use the z-index property to slide scrolling elements over/under fixed elements by assigning plus (+) or minus (-) values to z-index properties.

The header and left navigation menu on this site are working examples.
See the code example at right for syntax.

"Position:" property values & definitions:



More Notes:

Upgrading Websites to CSS
Positioning Website Elements on a Page with CSS

MENU:

Master Recommend Pro V4
Build recommend this site forms with marketing advantages - download links, database.
Master Members Only V3
Maintain your own members-only or restricted access site with any number of pages and members.
Master Form V4
A simple contact form or a complex multipage registration form.
Master Autoresponder Bank
Offer site visitors information via a form on a web page, an email link or URL link.
www.WillMaster.com/software