body{
  /* Achtergrond waar de hele site op komt. Site is gecentreerd. */
  background-color:#2d2d2d;   /* Donker grijs */
  padding: 0px;		/* als deze niet gereset worden krijg ik een grijze */
  margin:  8px;      /* rand boven het blauwe main_block die veroorzaakt */
  border:  0px;      /* wordt door de margin. */
}

div.concept{
  /* Laad dit blok alleen zien als de site nog niet officieel is. */
  margin: 0px;
  border: 0px;
  padding: 0px;
  background: red;
  color: white;
  font-family:"Times New Roman",Times,serif;
  text-align: center;
  color: white; 
  font-size: 1em;
  font-weight:bold;
  display:none;
  /* display: block/none;*/
}
  
div.main_block{
  /* Dit is het blok waar de hele site in zit. */
  border:0px;
  margin-left:auto;
  margin-right:auto;
  width:800px;
  background-color: #6888a3;  /* Grijzig blauw, wordt overschreven door individuele tabbladen */
  color:#6888a3;  /* Grijzig blauw, wordt overschreven door individuele tabbladen */
  text-align:left;
  padding:0px;
  overflow:hidden;
}

div.breadcrumb{
/* Eerste regel van de site die weergeeft waar je je op de site bevindt. */
  font-family:Arial,Helvetica,sans-serif;
  color: white; 
  font-size: 0.8em;
  margin-left: 8px;
  
/*
  font-letter-spacing 	Increases or decreases the space between characters in a text
  font-line-height 	Sets the line height
  font-text-align 	Specifies the horizontal alignment of text
  font-text-decoration 	Specifies the decoration added to text
  font-text-indent 	Specifies the indentation of the first line in a text-block
  font-text-shadow 	Specifies the shadow effect added to text
  font-text-transform 	Controls the capitalization of text
  font-vertical-align 	Sets the vertical alignment of an element
  font-white-space 	Specifies how white-space inside an element is handled
  font-word-spacing 	Increases or decreases the space between words in a text
*/
}

div.content{
  padding-top: 1px;		/* Als er helemaal niets in de div gebeurd is de achtergrondkleur ook niet zichtbaar. */
  padding-bottom: 1px;   /* Daarom is de padding 1 px. */
  margin:  0px;     
  border:  0px;
}

h1.logo{
  /* Geeft de topbalk met het logo weer. */
  width:800px;
  height:221px;
  background:url(topbar.png) 0 0;
  padding: 0px;		
  margin:  0px;     
  border:  0px; 
  z-index:-1;
  clear:right;
}
  
span.logo{
  /* Verwijdert de titel nu de topbalk er staat. */
  display:none;
}

/* Hier komt het hoofdmenu */
h1.main_menu{
  /* Verwijdert de titel van het hoofdmenu. */
  display:none;
}

ul.main_menu{
  list-style-type:none;
  margin:0px;
  padding:0px;
  border:0px;
  padding:0px;
}

li.main_menu{
  position:relative;
  float:left;
  top:-29px;
  left: 5px;
  padding-top:5px;
  padding-bottom:5px;
  display:inline;
}
/* Geef ieder tabblad een andere kleur. */
li#item1{
  background-color:transparent; 
  margin-left:20px;
}
li#item2{
  background-color:#8e0000; /* rood */
  margin-left:14px;
}
li#item3{
  background-color:#004b00;  /* groen. */
  margin-left:16px;
}
li#item4{
  background-color:#805500;  /* bruin. */
  margin-left:16px;
}
li#item5{
  background-color:#d46600;  /* oranje. */
  margin-left:15px;
}

a.main_menu:link,a.main_menu:visited{
  font-family:Arial,Helvetica,sans-serif;
  font-weight:normal;
  color:#ffffff;  /* White. */
  padding-left:10px;
  padding-right:10px;
  padding-top:5px;
  padding-bottom:8px;
  text-align:center;
  text-decoration:none;
  text-transform:uppercase;
}

a.main_menu:hover,a.main_menu:active{
  color:	#ffd700;  /* gold. */
  text-decoration:underline;
}

/* Het utilities menu. */
ul.utilities{
  position:relative;
  float: right;
  left: -30px;
  top: 10px;
  height:0px;       /* Deze zou niet moeten hoeven, maar anders wordt de hoogte meegerekend. */
  padding: 0px;
  margin: 0px;
  border: 0px;
  list-style-type:none;
  font-family:Arial,Helvetica,sans-serif;
  font-weight:normal;
  font-size:.9em;
  text-align:left;  /* bug in IE 5 */
}

a.utilities:link,a.utilities:visited{
  color:	#ffffff;  /* white. */
  text-decoration:none;
}
a.utilities:hover,a.utilities:active{
  color:	#ffd700;  /* gold. */
  text-decoration:underline;
}


/* Achtergrondkleur van de hoofdpagina. */
div#start{
  background-color:#6888a3;  /* Grijzig blauw */
  color:#6888a3;
  border-color: #6888a3; 
}
div#schilderijen{
  background-color:#8e0000; /* rood */
  color:#8e0000;
  border-color: #8e0000; 
}
div#verlichting{
  background-color:#004b00;  /* groen. */
  color:#004b00;
  border-color: #004b00; 
}
div#overig{
  background-color:#805500;  /* bruin. */
  color:#805500;
  border-color: #805500; 
}
div#overons{
  background-color:#d46600;  /* oranje. */
  color:#d46600;
  border-color: #d46600; 
}

/* Het subnavigatie menu. */
h1.subnav{
  /* Verwijdert de titel van het subnavigatiemenu. */
  position:relative;
  float:right;
  padding: 0px;
  margin: 0px;
  border: 0px;
  display: none;
}

ul.subnav{
  position:relative;
  float:right;
  top:0px;
  left:0px;
  margin: 0px;
  margin-left:30px;
  margin-right: 3px;
  padding:15px;

  list-style-type:none;
  text-decoration:none;
  font-family:Arial,Helvetica,sans-serif;
  font-weight:normal;
  font-size:1em;
  text-align:left;  /* bug in IE 5 */

  background: white; 
  -moz-border-radius: 15px;
  -webkit-border-radius: 15px;
  -khtml-border-radius: 15px;
  border-radius: 15px;
  border:1px solid;  /* Grijzig blauw */
}

/* Tekstkleur van de subnavigatie hyperlinks. */
a#start:link, a#start:visited{
  color:#6888a3;		/* blue. */
  text-decoration:none;
}
a#schilderijen:link, a#schilderijen:visited{
  color:#8e0000;		/* red. */
  text-decoration:none;
}
a#verlichting:link, a#verlichting:visited{
  color:#004b00;		/* green. */
  text-decoration:none;
}
a#overig:link, a#overig:visited{
  color:#805500;		/* brown. */
  text-decoration:none;
}
a#overons:link, a#overons:visited{
  color:#d46600;  /* orange. */
  text-decoration:none;
}

a#start:hover, a#start:active{
  color:#ffd700;  /* gold. */
  text-decoration:underline;
}
a#schilderijen:hover, a#schilderijen:active{
  color:#ffd700;  /* gold. */
  text-decoration:underline;
}
a#verlichting:hover, a#verlichting:active{
  color:#ffd700;  /* gold. */
  text-decoration:underline;
}
a#overig:hover, a#overig:active{
  color:#ffd700;  /* gold. */
  text-decoration:underline;
}
a#overons:hover, a#overons:active{
  color:#ffd700;  /* gold. */
  text-decoration:underline;
}
a.subnav:hover,a.subnav:active{
  color:	#ffd700;  /* gold. */
  text-decoration:underline;
}

/* Standaard tekstblok. */
div.textblock{
  font-family:Arial,Helvetica,sans-serif;
  font-weight:normal;
  font-size:1.1em;
  padding:15px;
  margin: 30px;
  background: white; 
  -moz-border-radius: 15px;
  -webkit-border-radius: 15px;
  -khtml-border-radius: 15px;
  border-radius: 15px;
  border:1px solid white;
}
  
/* Standaard header. */
h1{
  font-family:Arial,Helvetica,sans-serif;
  font-weight:bold;
  font-size:1.5em;
  padding:0px 0px 5px 0px;
  margin:0px;
}

/* Standaard nieuw object plaatje met omschrijving. */
div.plaatjes{
  position:relative;
  top:0px;
  height: auto;
  width: auto;
  clear:both;
  padding:0px;
  margin: 0px;
  border: 0px;
  overflow:hidden;
}
div.new_instock_img{
  float:left;
  margin: 2px;
  height: auto;
  width: auto;
  text-align: center;
}

div.new_instock_img img{
  display: inline;
  margin: 3px;
  padding: 2px;
  border: 2px solid #ffffff;
  -moz-border-radius: 15px;
  -webkit-border-radius: 15px;
  -khtml-border-radius: 15px;
  border-radius: 15px;
  height: 200px;
  width: 216px;  
  
}

div.new_instock_img a:hover img{
  border: 2px solid #6888a3;  /* Grijzig blauw */
}

div.desc{
  text-align: center;
  font-weight: normal;
  font-size: 0.9em;
  width: auto;
  margin: 2px;
  padding-bottom: 10px;
}


/* Standaard catalogus plaatje met omschrijving. */
/*
div.plaatjes{
  position:relative;
  top:0px;
  height: auto;
  width: auto;
  clear:both;
  padding:0px;
  margin: 0px;
  border: 0px;
  overflow:hidden;
}
*/ 

div.catalog_image{
  margin: 2px;
  height: auto;
  width: auto;
}

div.catalog_image img{
  margin: 3px;
  padding: 2px;
  border: 5px solid #ffffff;
  -moz-border-radius: 15px;
  -webkit-border-radius: 15px;
  -khtml-border-radius: 15px;
  border-radius: 15px;
  width: 400px;  
}

div.catalog_image a:hover img{
  border: 5px solid #8e0000;  /* Rood */
}

div.catalog_omschr{
  position:relative;
  top:-180px;
  left: 425px;
  height:0px;
  color: grey;
  font-style:italic;
  line-height:1.5;
  font-size:0.8em;
  text-align: left;
  font-weight: normal;
  width: auto;
  margin: 0px;
}

div.catalog_omschr a{
  position:relative;
  font-size: 1.2em;
  top: 5px;
  font-style:normal;
}

div.catalog_desc{
  position:relative;
  top:-180px;
  left: 500px;
  height:0px;
  color: grey;
  font-size:1em;
  text-align: left;
  font-weight: normal;
  width: auto;
  margin: 0px;
}

li.niveau1{
	margin:10px;

}

/* onderstaande is mijn kleur blauw 
background-color:#6888a3;

.classname geldt voor tags met het class=classname attribute
#idname geldt voor tags met id=idname

background-image:url('paper.gif');
background-repeat:repeat-x;  /* repeat only horizontally /
background-repeat:no-repeat;
background-position:right top;

Alles mag ook in één commando.
background:#ffffff url('img_tree.png') no-repeat right top;
* Volgorde is dan:
    background-color
    background-image
    background-repeat
    background-attachment    Sets whether a background image is fixed or scrolls with the rest of the page
    background-position

margin-right:200px;
background-attachment:fixed;
text-align: center/justify/right;
text-transform: uppercase/lowercase/capitalize;
color: #A7C942;
text-indent: 50px;
letter-spacing:3px;   Kan ook negatief zijn om de letters dichter opelkaar te proppen.
a {text-decoration:none;}  Geen streep onder hyperlink
h1 {text-decoration:overline;}
h2 {text-decoration:line-through;}
h3 {text-decoration:underline;}
h4 {text-decoration:blink;
* 
p.small {line-height:70%;}
p.big {line-height:200%;}
word-spacing:30px;
white-space:nowrap;    No text wrapping
div.ex1 {direction:rtl;}   Tekst richting van rechts naar links. Werkt niet bij firefox geloof ik
img.top {vertical-align:text-top;}

all options:
color 	Sets the color of text
direction 	Specifies the text direction/writing direction
letter-spacing 	Increases or decreases the space between characters in a text
line-height 	Sets the line height
text-align 	Specifies the horizontal alignment of text
text-decoration 	Specifies the decoration added to text
text-indent 	Specifies the indentation of the first line in a text-block
text-shadow 	Specifies the shadow effect added to text
text-transform 	Controls the capitalization of text
unicode-bidi 	 
vertical-align 	Sets the vertical alignment of an element
white-space 	Specifies how white-space inside an element is handled
word-spacing 	Increases or decreases the space between words in a text

als je een font selecteerd moet je meerdere opties geven. Je begint met degene die je wilt 
dan één die er op lijkt. dan zijn family.
Serif zijn de extra streepjes om de letter mooi te maken van times new roman
Sans-serif is dus arial die heeft geen streepjes
de laatste family is monoscript; hier hebben alle letters dezelfde breedte.
Monospace 	Courier New Lucida Console

p.serif{font-family:"Times New Roman",Times,serif;}
p.sansserif{font-family:Arial,Helvetica,sans-serif;}

p.normal {font-style:normal;}
p.italic {font-style:italic;}
p.oblique {font-style:oblique;}
font-size:20px;    Werkte niet in Explorer voor v9.0
* default font-size = 16 px, dit is gelijk aan 1 em, wat MS E gebruikte /* 14px/16=0.875em /
em wordt door W3C aangeraden. Helaas werkt het dan nog niet. Eikels bij MS. Oplossing is zet de font-size in procenten bij het body element
body {font-size:100%;}
h1 {font-size:2.5em;}
h2 {font-size:1.875em;}
p {font-size:0.875em;}

Dit is ook leuk.
p.normal {font-weight:normal;}
p.light {font-weight:lighter;}
p.thick {font-weight:bold;}
p.thicker {font-weight:900;}

p.normal {font-variant:normal;}
p.small {font-variant:small-caps;}
* 
p.ex1
{
font:15px arial,sans-serif;
}

p.ex2
{
font:italic bold 12px/30px Georgia,serif;
}
* 
* 
Let op! onderstaande volgorde is significant
a:link {color:#FF0000;}      /* unvisited link /
a:visited {color:#00FF00;}  /* visited link /
a:hover {color:#FF00FF;}  /* mouse over link /
a:active {color:#0000FF;}  /* selected link / 
a:link {text-decoration:none;}    /* unvisited link /
a:visited {text-decoration:none;} /* visited link 
a:hover {text-decoration:underline;}   /* mouse over link /
a:active {text-decoration:underline;}  /* selected link /
Ook leuk voorbeeld
a:link,a:visited
{
display:block;
font-weight:bold;
color:#FFFFFF;
background-color:#98bf21;
width:120px;
text-align:center;
padding:4px;
text-decoration:none;
}
a:hover,a:active
{
background-color:#7A991A;
}
* 

In HTML, there are two types of lists:

    unordered lists - the list items are marked with bullets
    ordered lists - the list items are marked with numbers or letters

ul.a {list-style-type:circle;}
ul.b {list-style-type:square;}
ol.c {list-style-type:upper-roman;}
ol.d {list-style-type:lower-alpha;}

<ul class="a">
  <li>Tea</li>
  <li>Coca Cola</li>
</ul>

<ol class="d">
  <li>Coffee</li>
  <li>Coca Cola</li>
</ol>
* 
Alternatieven:
ul.a {list-style-type:circle;}
ul.b {list-style-type:disc;}
ul.c {list-style-type:square;}

ol.d {list-style-type:armenian;}
ol.e {list-style-type:cjk-ideographic;}
ol.f {list-style-type:decimal;}
ol.g {list-style-type:decimal-leading-zero;}
ol.h {list-style-type:georgian;}
ol.i {list-style-type:hebrew;}
ol.j {list-style-type:hiragana;}
ol.k {list-style-type:hiragana-iroha;}
ol.l {list-style-type:katakana;}
ol.m {list-style-type:katakana-iroha;}
ol.n {list-style-type:lower-alpha;}
ol.o {list-style-type:lower-greek;}
ol.p {list-style-type:lower-latin;}
ol.q {list-style-type:lower-roman;}
ol.r {list-style-type:upper-alpha;}
ol.s {list-style-type:upper-latin;}
ol.t {list-style-type:upper-roman;}

ol.u {list-style-type:none;}
ol.v {list-style-type:inherit;}
* 

Butlet uit plaatje:
list-style-image:url('sqpurple.gif');
short style:
list-style: square url("sqpurple.gif");

Helaas weer niet cross browser. dat moet zo:
ul
{
list-style-type: none;
padding: 0px;
margin: 0px;
}
ul li
{
background-image: url(sqpurple.gif);
background-repeat: no-repeat;
background-position: 0px 5px;
padding-left: 14px;
}

Example explained:

    For ul:
        Set the list-style-type to none to remove the list item marker
        Set both padding and margin to 0px (for cross-browser compatibility)
    For all li in ul:
        Set the URL of the image, and show it only once (no-repeat)
        Position the image where you want it (left 0px and down 5px)
        Position the text in the list with padding-left

Tabelen heb ik overgeslagen zie: http://www.w3schools.com/Css/css_table.asp
* 
* 
width:250px;
padding:10px;
border:5px solid gray;
margin:10px; 
De totale breedte is hier 300 px.
IE8 and earlier versions of IE, included padding and border in the width property. To fix this problem, add a <!DOCTYPE html> to the HTML page.


Border Style
The border-style property specifies what kind of border to display.
Remark None of the border properties will have ANY effect unless the border-style property is set!
border-style values:

none: Defines no border
dotted: Defines a dotted border
dashed: Defines a dashed border
solid: Defines a solid border
double: Defines two borders. The width of the two borders are the same as the border-width value
groove: Defines a 3D grooved border. The effect depends on the border-color value
ridge: Defines a 3D ridged border. The effect depends on the border-color value
inset: Defines a 3D inset border. The effect depends on the border-color value
outset: Defines a 3D outset border. The effect depends on the border-color value
zie http://www.w3schools.com/Css/css_border.asp
* 
border-style:solid;
border-width:medium/5px;
You can also set the border color to "transparent".
border-top-style:dotted;
border-right-style:solid;
border-bottom-style:dotted;
border-left-style:solid;
* 
Ook:
border-left-width=15px;  en
border-color:#ff0000 #00ff00 #0000ff rgb(250,0,255);
* 
    border-style:dotted solid double dashed;
        top border is dotted
        right border is solid
        bottom border is double
        left border is dashed

    border-style:dotted solid double;
        top border is dotted
        right and left borders are solid
        bottom border is double

    border-style:dotted solid;
        top and bottom borders are dotted
        right and left borders are solid

    border-style:dotted;
        all four borders are dotted
border:5px solid red;


An outline is a line that is drawn around elements (outside the borders) to make the element "stand out".
However, the outline property is different from the border property.
The outline is not a part of an element's dimensions; the element's total width and height is not affected by the width of the outline.
Commando's hetzelfde als bij border. bijvoorbeeld:
outline-color
* 
The margin clears an area around an element (outside the border). The margin does not have a background color, and is completely transparent.
The top, right, bottom, and left margin can be changed independently using separate properties. A shorthand margin property can also be used, to change all margins at once.
auto 	The browser calculates a margin
length 	Specifies a margin in px, pt, cm, etc. Default value is 0px
% 	Specifies a margin in percent of the width of the containing element
inherit 	Specifies that the margin should be inherited from the parent element

It is possible to use negative values, to overlap content.
margin-top:100px;
margin-bottom:100px;
margin-right:50px;
margi.container
{
text-align:center;
}

.center_div
{
border:1px solid gray;
margin-left:auto;
margin-right:auto;
width:90%;
background-color:#d0f0f6;
text-align:left;
padding:8px;
}
n-left:50px;

    margin:25px 50px 75px 100px;
        top margin is 25px
        right margin is 50px
        bottom margin is 75px
        left margin is 100px

    margin:25px 50px 75px;
        top margin is 25px
        right and left margins are 50px
        bottom margin is 75px

    margin:25px 50px;
        top and bottom margins are 25px
        right and left margins are 50px

    margin:25px;
        all four margins are 25px


length 	Defines a fixed padding (in pixels, pt, em, etc.)
% 	Defines a padding in % of the containing element

padding-top:25px;
padding-bottom:25px;
padding-right:50px;
padding-left:50px;


Advanced:
* 
Grouping selectors to save space:
h1,h2,p
{
color:green;
}
* 
Nested Selectors: alle <p> waar eerder class=marked is gebruikt worden wit, maar wel gecentreerd
p
{
color:blue;
text-align:center;
}
.marked
{
background-color:red;
}
.marked p
{
color:white;
} 


Dimensions
height, max-height, min-height, width, max-width, min-width
Values can be: auto, length, % or inherit

The display property specifies if/how an element is displayed, and the visibility property specifies if an element should be visible or hidden.
display:none or visibility:hidden
hidden: je ziet het element niet maar het neemt wel zijn ruimte in.
None: je ziet het element niet en het neem geen ruimte in.

A block element is an element that takes up the full width available, and has a line break before and after it.
Examples of block elements:
    <h1>
    <p>
    <div>

An inline element only takes up as much width as necessary, and does not force line breaks.
Examples of inline elements:
    <span>
    <a>

Je kan hiermee spelen, terwijl je de webstandaard blijft volgen:
li {display:inline;}

Vier mogelijke manieren om blokken te positioneren; standaard is static
fixed: is vastgezet op een plek op de pagina. De rest kan scrollen, maar dit blok niet waardoor het andere tekst kan overlappen.
relative: relatief t.o.v. zijn normale positie. Kan ook negatief. De plaats waar het element eigenlijk hoort blijft behouden.
absoluut: coordinaten op het papier. Als er gescrolled wordt gaat hij mee.

p.pos_fixed
{
position:fixed;
top:30px;
right:5px;
z-index:-1;      /* Dit geeft aan op welke laag het element zich bevindt.
}

position:absolute;
clip:rect(0px,60px,200px,0px);
 
div.scroll
{
background-color:#00FFFF;
width:100px;
height:100px;
overflow:visible, hidden, scroll, auto or inherit; default is visible (geen scrollbalk maar overflow uit gebied waar je mag komen, scroll maakt altijd een scrollbalk, hidden cropt tekst tot het wel in het vak past, auto maakt alleen een scrollbalk als de tekst inderdaad niet past. inherit neemt uitgangspunt van eerder commando over.
}


Dit is ook leuk:
<p>Mouse over the words to change the cursor.</p>
<span style="cursor:auto">auto</span><br>
<span style="cursor:crosshair">crosshair</span><br>
<span style="cursor:default">default</span><br>
<span style="cursor:e-resize">e-resize</span><br>
<span style="cursor:help">help</span><br>
<span style="cursor:move">move</span><br>
<span style="cursor:n-resize">n-resize</span><br>
<span style="cursor:ne-resize">ne-resize</span><br>
<span style="cursor:nw-resize">nw-resize</span><br>
<span style="cursor:pointer">pointer</span><br>
<span style="cursor:progress">progress</span><br>
<span style="cursor:s-resize">s-resize</span><br>
<span style="cursor:se-resize">se-resize</span><br>
<span style="cursor:sw-resize">sw-resize</span><br>
<span style="cursor:text">text</span><br>
<span style="cursor:w-resize">w-resize</span><br>
<span style="cursor:wait">wait</span><br> 

Property 	Description 	Values 	CSS
bottom 	Sets the bottom margin edge for a positioned box 	auto
length
%
inherit 	2
clip 	Clips an absolutely positioned element 	shape
auto
inherit 	2
cursor 	Specifies the type of cursor to be displayed 	url
auto
crosshair
default
pointer
move
e-resize
ne-resize
nw-resize
n-resize
se-resize
sw-resize
s-resize
w-resize
text
wait
help 	2
left 	Sets the left margin edge for a positioned box 	auto
length
%
inherit 	2
overflow
	Specifies what happens if content overflows an element's box 	auto
hidden
scroll
visible
inherit 	2
position 	Specifies the type of positioning for an element 	absolute
fixed
relative
static
inherit 	2
right 	Sets the right margin edge for a positioned box 	auto
length
%
inherit 	2
top 	Sets the top margin edge for a positioned box 	auto
length
%
inherit 	2
z-index 	Sets the stack order of an element 	number
auto
inherit 	2
* 
* 
* 
* 
* 
* 
With CSS float, an element can be pushed to the left or right, allowing other elements to wrap around it.
Float is very often used for images, but it is also useful when working with layouts.
float:right;

Onderstaande code maakt alle plaatjes even groot en zet ze voor zover er ruimte is op het scherm naast elkaar.
.thumbnail 
{
float:left;
width:110px;
height:90px;
margin:5px;
}
.text_line
{
clear:both;
margin-bottom:2px;
}
* 
clear 	Specifies which sides of an element where other floating elements are not allowed 	left, right, both, none or inherit 	1
float 	Specifies whether or not a box should float 	left, right, none, inherit



Voorbeeld hoe je een blok in het midden van de pagina zet, dat ook werkt met Explorer 5. Prutsers.
<!DOCTYPE html>
<html>
<head>
<style>
.container
{
text-align:center;
}
.center
{
margin-left:auto;
margin-right:auto;
width:70%;
background-color:#b0e0e6;
text-align:left;
}
</style>
</head>

<body>
<div class="container">
<div class="center">
<p>In my younger and more vulnerable years my father gave me some advice that I've been turning over in my mind ever since.</p>
<p>'Whenever you feel like criticizing anyone,' he told me, 'just remember that all the people in this world haven't had the advantages that you've had.'</p>
</div>
</div>

<p><b>Note:</b> In IE5 there is a margin handling bug for block elements. Block elements are sometimes treated as inline content. This is particularly problematic when it comes to centering.
For centering to work in IE5, use the text-align property, like in this example.</p>

</body>
</html>


Voorbeeld rechts:
.right
{
position:absolute;
right:0px;
width:400px;
background-color:#b0e0e6;
}

When aligning elements like this, it is always a good idea to predefine margin and padding for the <body> element. This is to avoid visual differences in different browsers.
There is a problem with IE8 and earlier, when using the position property. If a container element (in our case <div class="container">) has a specified width, and the !DOCTYPE declaration is missing, IE8 and earlier versions will add a 17px margin on the right side. This seems to be space reserved for a scrollbar. Always set the !DOCTYPE declaration when using the position property:
body
{
margin:0;
padding:0;
}
* 


CSS pseudo-classes are used to add special effects to some selectors. In dit geval is visited de pseudoclass. Na de : dus. De . is een CSS class (red) en die doet het dus ook.
a.red:visited {color:#FF0000;}
The :first-child pseudo-class matches a specified element that is the first child of another element.
Match the first <i> element in all <p> elements
p > i:first-child

Match all <i> elements in all first child <p> elements
p:first-child i

The :lang pseudo-class allows you to define special rules for different languages.
In the example below, the :lang class defines the quotation marks for q elements with lang="no":
q:lang(no)
{
quotes: "~" "~";
}

Voorbeeld van :focus in een formulier.
<!DOCTYPE html>
<html>
<head>
<style>
input:focus
{
background-color:yellow;
}
</style>
</head>

<body>
<form action="form_action.asp" method="get">
First name: <input type="text" name="fname" /><br>
Last name: <input type="text" name="lname" /><br>
<input type="submit" value="Submit" />
</form>

<p><b>Note:</b> IE8 supports the :focus pseudo-class only if a !DOCTYPE is specified.</p>

</body>
</html>

Pseudoclass:
:link 	a:link 	Selects all unvisited links
:visited 	a:visited 	Selects all visited links
:active 	a:active 	Selects the active link
:hover 	a:hover 	Selects links on mouse over
:focus 	input:focus 	Selects the input element which has focus
:first-letter 	p:first-letter 	Selects the first letter of every <p> element
:first-line 	p:first-line 	Selects the first line of every <p> element
:first-child 	p:first-child 	Selects every <p> elements that is the first child of its parent
:before 	p:before 	Insert content before every <p> element
:after 	p:after 	Insert content after every <p> element
:lang(language) 	p:lang(it) 	Selects every <p> element with a lang attribute value starting with "it"

h1:before {content:url(smiley.gif);}


Full vertical menu example:
<!DOCTYPE html>
<html>
<head>
<style>
ul
{
list-style-type:none;
margin:0;
padding:0;
}
a:link,a:visited
{
display:block;
font-weight:bold;
color:#FFFFFF;
background-color:#98bf21;
width:120px;
text-align:center;
padding:4px;
text-decoration:none;
text-transform:uppercase;
}
a:hover,a:active
{
background-color:#7A991A;
}
</style>
</head>

<body>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#news">News</a></li>
<li><a href="#contact">Contact</a></li>
<li><a href="#about">About</a></li>
</ul>
</body>
</html>
* 
* 
* 
* 
Weer leuk zie ook voorbeelden. 
  opacity:0.6;
  filter:alpha(opacity=60); /* For IE8 and earlier /

An image sprite is a collection of images put into a single image.
A web page with many images can take a long time to load and generates multiple server requests.
Using image sprites will reduce the number of server requests and save bandwidth.
<!DOCTYPE html>
<html>
<head>
<style>
img.home
{
width:46px;
height:44px;
background:url(img_navsprites.gif) 0 0;
}
img.next
{
width:43px;
height:44px;
background:url(img_navsprites.gif) -91px 0;
}
</style>
</head>

<body>
<img class="home" src="img_trans.gif" width="1" height="1" />
<br><br>
<img class="next" src="img_trans.gif" width="1" height="1" />
</body>
</html>

Verschillende media
@media screen,print
  {
  p.test {font-weight:bold;}
  }
all 	Used for all media type devices
aural 	Used for speech and sound synthesizers
braille 	Used for braille tactile feedback devices
embossed 	Used for paged braille printers
handheld 	Used for small or handheld devices
print 	Used for printers
projection 	Used for projected presentations, like slides
screen 	Used for computer screens
tty 	Used for media using a fixed-pitch character grid, like teletypes and terminals
tv 	Used for television-type devices



/* using an image to replace text in an h1. This trick courtesy Douglas Bowman, http://www.stopdesign.com/articles/css/replace-text/ /
#pageHeader h1 { 
	background: transparent url(h1.gif) no-repeat top left; 
	margin-top: 10px; 
	width: 219px; 
	height: 87px; 
	float: left;
	}
#pageHeader h1 span {
	display:none
	}

* 
*/

