html - Image at background button -
i have little problem css file. create hmtl file , css file style , idea put in background of button form image. when use css file doesn't work use style parameter of button working fine, not understand.
my html/css code this:
@charset "utf-8"; /* css document */ body { text-align: center; } .btn-image { width: 300px; background-image: url('/images/ok/login-login-on.png'); background-repeat: no-repeat; background-position: center; }
<!doctype html> <html> <head> <meta charset="utf-8"> <title>test - log in</title> <!-- bootstrap --> <link href="assets/css/style.css" rel="stylesheet"> </head> <body> <div class="container"> <div class="row"> <div class="col-sm-6 col-md-4 col-md-offset-4"> <img src="images/ok/logo.png" width="200" height="200" alt="" /> <br></br> <div class="box-center"> <form action="connectdb.php" method="post"> <input type="text" class="txtbox-login-image" placeholder="usuario" name="username" required autofocus> <input type="password" class="txtbox-password-image" placeholder="password" name="password" required> <!-- option not works --> <button class="btn-image" type="submit">submit</button> <!-- option works --> <button style="background-image: url('images/ok/login-login-on.png'); width: 100px; border: 1px solid #fff; margin: 0 auto; display: block;">login</button> </form> </div> </div> </div> </div> </body> </html>
help me, please ;)
button[type="submit"] { background: url('path/to/file'); ... }
Comments
Post a Comment