2016-07-15 20 views
1

Ich habe diese Form:CSS Form Anwendung nicht

<div class="jumbotron" id="jumbotron-6" align="center">   
    <form action="login.php" method="POST"> 
     <input type="text" placeholder="Enter your email" name="email"> 
     <input type="password" placeholder="and password" name="password"> 
     <input type="submit"> 
    </form> 
</div> 

Und ich versuche diese CSS, um es anzuwenden:

input [type="text"], input [type="password"] { 
    outline: none; 
    padding: 10px; 
    display: block; 
    width: 300px; 
    border-radius: 3px; 
    border:1px solid #eee; 
    margin:20px auto; 
} 

Aber es ist die Anwendung nicht. Ich habe meine CSS auch auf die Seite verlinkt.

+0

Well keine Werke Form und es zeigt aber die CSS es ändert sich nicht – EllisJ98

Antwort

1

input [type="text"], input [type="password"] {

dass Elemente innerhalb ein Eingabeelement (nicht in HTML) wählen würde, die eine Art von Text oder Passwort haben - können Sie die Räume entfernen müssen, Eingabeelemente zu wählen, dass themsleves sind vom Typ Text oder Passwort:

input[type="text"], input[type="password"] {

3

Remov e der Abstand so wäre es eingegeben werden [....]

input[type="text"], input[type="password"] { 
 
    outline: none; 
 
    padding: 10px; 
 
    display: block; 
 
    width: 300px; 
 
    border-radius: 3px; 
 
    border:1px solid #eee; 
 
    margin:20px auto; 
 
}
<div class="jumbotron" id="jumbotron-6" align="center">   
 
    <form action="login.php" method="POST"> 
 
     <input type="text" placeholder="Enter your email" name="email"> 
 
     <input type="password" placeholder="and password" name="password"> 
 
     <input type="submit"> 
 
    </form> 
 
</div>