Sahra: css vererben, Problem.

Ich habe in meiner CSS für ein Formularfeld die class feld.

.feld input{
border: 1px solid #B5B5B5;
color: #333333;
font-family: Arial,Helvetica,sans-serif;
font-size: 14px;
padding: 4px;
width: 200px;
}

nur möchte ich das gleiche Feld nur Zahlen zulassen, also brauche ich es nicht so gross sondern nur 30 pixel breit.

.feld2 input{
border: 1px solid #B5B5B5;
color: #333333;
font-family: Arial,Helvetica,sans-serif;
font-size: 14px;
padding: 4px;
width: 30px;
}

ich würde es gerne vereinfacht machen:

.feld input{
border: 1px solid #B5B5B5;
color: #333333;
font-family: Arial,Helvetica,sans-serif;
font-size: 14px;
padding: 4px;
width: 200px;
}

.feld, feld2 input{
width: 30px;
}

aber es klappt nicht so wie es soll, was mache ich falsch.

Sahra

  1. @@Sahra:

    nuqneH

    .feld, feld2 input{

    Du denkst vorfahre nachfahre1, nachfahre2 wäre dasselbe wie vorfahre nachfahre1, vorfahre nachfahre2.

    Und mach mal ’n Punkt!

    Qapla'

    --
    „Talente finden Lösungen, Genies entdecken Probleme.“ (Hans Krailsheimer)