Webseitenbau
Home
Sitemap
 
Web Webseitenbau
Google English français  
↑ 4. 8. 4 Das Stylesheet des Formulars formular.css

4.8.4 Das Stylesheet des Formulars formular.css

a) Das Stylesheet für Formulare dieser Website

b) Erklärungen zu den einzelnen Angaben im Stylesheet

1) Formularbox: form { ...}

form { 
  background:#9EC8F2;
  color:#000000; 
  border:thin solid #6666FF;
  margin:0;
  padding:0 1em 1em 1em;
}

2) "Labels" label {...}

label {              
  display:block;
  float:left; /*Die Beschriftung "floatet" links*/
  margin-top:4px;  
  padding-right:1em; /*Abstand rechts der Beschriftung*/
  width:9em; /*Breite links der Mittellinie*/
  text-align:right; /*Beschriftung nach rechts ausgerichtet*/ 
}

3) Input input {...}

input, textarea {
  margin-top:4px;  
  padding:0;
  vertical-align:middle;
  font-size:1em;
  font-family:monospace;
  width:auto;
}

4) Select select {...}

select {            
  margin-top:4px;  
}

5) Submit-Button: input [type=submit]

Formatierung:

/*type= wird vom IE6 nicht verstanden*/
.input[type=submit], input[type=reset], input[type=button] {
  padding:1px 3px;
  font-size:1em;
  font-family:sans-serif;
}

c) Ganzes Stylesheet

form { 
  background:#9EC8F2;
  color:#000000; 
  border:thin solid #6666FF;
  margin:0;
  padding:0 1em 1em 1em;
}

label {              
  display:block;
  float:left; /*Die Beschriftung "floatet" links*/
  margin-top:4px;  
  padding-right:1em; /*Abstand rechts der Beschriftung*/
  width:9em; /*Breite links der Mittellinie*/
  text-align:right; /*Beschriftung nach rechts ausgerichtet*/ 
}

input, textarea {
  margin-top:4px;  
  padding:0;
  vertical-align:middle;
  font-size:1em;
  font-family:monospace;
  width:auto;
}

.input[type=submit], input[type=reset], input[type=button] {
  padding:1px 3px;
  font-size:1em;
  font-family:sans-serif;
}

select {            
  margin-top:4px;  
}

br {
 clear: left;
{