CSS: Unterschied zwischen den Versionen

Aus Claudio's Wiki
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: ==CSS Syntax== Prinzip: <pre>selector {property: value}</pre> Beispiel: <pre> body {color: black} oder: body { text-align: center; color: black; font-family: a...)
 
Zeile 67: Zeile 67:
 
}
 
}
 
</pre>
 
</pre>
 +
 +
==Ein paar Links==
 +
 +
* [http://www.w3schools.com/css/default.asp CSS bei W3CSchools]
 +
* [http://de.wikipedia.org/wiki/Cascading_Style_Sheets CSS auf Wikipedia]
 +
* [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://de.selfhtml.org/css/ CSS bei SelfHTML]

Version vom 27. Januar 2009, 10:31 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