CSS: Unterschied zwischen den Versionen

Aus Claudio's Wiki
Wechseln zu: Navigation, Suche
(Ein paar Links)
 
Zeile 73: Zeile 73:
 
* [http://de.wikipedia.org/wiki/Cascading_Style_Sheets CSS auf Wikipedia]
 
* [http://de.wikipedia.org/wiki/Cascading_Style_Sheets CSS auf Wikipedia]
 
* [http://www.w3.org/Style/CSS/ CSS bei W3.org (EN)]
 
* [http://www.w3.org/Style/CSS/ CSS bei W3.org (EN)]
** [http://www.edition-w3c.de/TR/1998/REC-CSS2-19980512/ Deutsche Uebersetzung zu W3.org]
+
** [http://www.edition-w3c.de/TR/1998/REC-CSS2-19980512/ Deutsche Uebersetzung zu W3C.org]
 
* [http://de.selfhtml.org/css/ CSS bei SelfHTML]
 
* [http://de.selfhtml.org/css/ CSS bei SelfHTML]

Aktuelle Version vom 27. Januar 2009, 10:32 Uhr

CSS Syntax

Prinzip:
selector {property: value}

Beispiel:

body {color: black}
oder:
body
{
  text-align: center;
  color: black;
  font-family: arial
}

Gruppierung:

h1,h2,h3,h4,h5,h6 
{
color: green
}

Class-Selector:

p.center
{
  text-align: center
}

Mehrere Class gleichzeitig:

.center
{
  text-align: center
}

ID-Selector:

p#para1
{
text-align: center;
color: red
}

Spezielle Attribute:

input[type="text"]
{
  background-color: blue
}

CSS Comments:

/* This is a comment */
p
{
  text-align: center;
  /* This is another comment */
  color: black;
  font-family: arial
}

Ein paar Links