Change source of input submit value and reset

2

Is there any way to change the font-family of the value of input submit and reset, just as I did with the placeholder using ::-webkit-input-placeholder

And it's like someone from you to give me a help and help me align the checkbox next to the name because it's moved up.

<!DOCTYPE html>
    <html lang="pt-br">
    <head>
        <meta charset="utf-8">
        <title></title>
        <meta name="author" content="Flavio S. Cabral">
        <!-- FONT MIRIAM LIBRE -->
        <link href="https://fonts.googleapis.com/css?family=Miriam+Libre" rel="stylesheet">
        <style type="text/css">

            body {
                background-color: rgba(46, 86, 162, 0.8);
            }

            fieldset {
                border: none;
            }


            label, legend {
                font-family: 'Miriam Libre', sans-serif;
                color: white;
            }

            input, select {
                margin-top: 15px;
                border-radius: 5px;
                height: 20px;
            }

            select {
                height: 25px;
                font-family: 'Miriam Libre', sans-serif;
            }

            input[type="submit"],  input[type="reset"] {
                height: 25px;
                background-color: white;
                border-radius: 5px;
            }

            ::-webkit-input-placeholder {
                font-family: 'Miriam Libre', sans-serif;
                padding-left: 5px;
            }

        </style>
    </head>
    <body>
    
    <form action="" method="">
        <fieldset>
            <legend>Inscrição</legend>

            <label for="user_name">Nome:</label>
            <input type="text" name="user_name" id="user_name" placeholder="Seu nome..." autofocus> <br>

            <label for="user_email">Email:</label>
            <input type="email" name="user_email" id="user_email" placeholder="[email protected]"> <br>

            <label for="user_address">Endereço:</label>
            <input type="text" name="user_address" id="user_address" placeholder="Rua - Nº"> <br>

            <label for="user_tel">Telefone / Celular:</label>
            <input type="tel" name="user_tel" id="user_tel"> <br>

            <label for="user_curso">Curso:</label>
            <select name="user_curso" id="user_curso">
                <option value="violin">Violino</option>
                <option value="cello">Violoncelo</option>
                <option value="guitar">Violão</option>
                <option value="drums">Bateria</option>
                <option value="piano">Piano</option>
                <option value="saxophone">Saxofone</option>
            </select> <br>

            <label for="user_instrutor">Instrutor:</label>
            <select name="user_instrutor" id="user_instrutor">
                <option value="beethoven">Beethoven</option>
                <option value="bach">Bach</option>
                <option value="mozart">Mozart</option>
                <option value="chopin">Chopin</option>
                <option value="liszt">Liszt</option>
                <option value="tchaikovsky">Tchaikovsky</option>
            </select> <br>

            <label for="user_aulas">Aulas de : </label>
            <input type="checkbox" name="week_days" value="monday" id="monday"> <label for="monday">Segunda-Feira</label> 
            <input type="checkbox" name="week_days" value="tuesday" id="tuesday"> <label for="tuesday">Terça-Feira</label> 
            <input type="checkbox" name="week_days" value="wednesday" id="wednesday"> <label for="wednesday">Quarta-Feira</label> 
            <input type="checkbox" name="week_days" value="thursday" id="thursday"> <label for="thursday">Quinta-Feira</label> 
            <input type="checkbox" name="week_days" value="friday" id="friday"> <label for="friday">Sexta-Feira</label> <br>

            <input type="submit" value="Enviar">
            <input type="reset" value="Limpar">
                
        </fieldset>
    </form>

    </body>
</html>
    
asked by anonymous 26.08.2016 / 23:14

2 answers

3

Yes you just have to define a class for your element.

.submit{
font: Arial;
font-size:12px;
color: #ff0033
}
.reset{
font: Arial;
font-size:12px;
color: #0033ff
}
<input class="submit" type="submit" value="Enviar">
<input class="reset" type="reset" value="Limpar">

If the answer is correct you could validate it. Hope it helps.

    
27.08.2016 / 00:33
1

You do not need to use placeholder using ::-webkit-input-placeholder

just put font-family: 'Miriam Libre', sans-serif; that will work

 input[type="submit"],  input[type="reset"] {
  font-family: 'Miriam Libre', sans-serif;
 }

I also put the layout settings in the example below, so I put the divs more to help with the formatting of the content

<!DOCTYPE html>
    <html lang="pt-br">
    <head>
        <meta charset="utf-8">
        <title></title>
        <meta name="author" content="Flavio S. Cabral">
        <!-- FONT MIRIAM LIBRE -->
        <link href="https://fonts.googleapis.com/css?family=Miriam+Libre" rel="stylesheet">
        <style type="text/css">

            body {
                background-color: rgba(46, 86, 162, 0.8);
            }

            fieldset {
                border: none;
            }


            label, legend {
                font-family: 'Miriam Libre', sans-serif;
                color: white;
            }

            input, select {
                margin-top: 15px;
                border-radius: 5px;
                height: 20px;
            }

            select {
                height: 25px;
                font-family: 'Miriam Libre', sans-serif;
            }

            input[type="submit"],  input[type="reset"] {
                height: 25px;
                background-color: white;
                font-family: 'Miriam Libre', sans-serif;
                border-radius: 5px;
            }

            ::-webkit-input-placeholder {
                font-family: 'Miriam Libre', sans-serif;
                padding-left: 5px;
            }
          
          .input-label {
            width:100%;
            display: flex;
            align-items: baseline;
          }
          .label{
            
            width:20%;
          }

        </style>
    </head>
    <body>
    
    <form action="" method="">
        <fieldset>
            <legend>Inscrição</legend>
             <div class="input-label">
            <div class="label">
              <label for="user_name">Nome:</label>
            </div>
            <div class="input">
              <input type="text" name="user_name" id="user_name" placeholder="Seu nome..." autofocus> <br>
            </div>
            </div>
            
             <div class="input-label">
              <div class="label">
          
                <label for="user_email">Email:</label>
             </div>
             <div class="input">            
                <input type="email" name="user_email" id="user_email" placeholder="[email protected]"> <br>
             </div>
            </div>
            
            <div class="input-label">
              <div class="label">
                <label for="user_address">Endereço:</label>
                        </div>
            <div class="input">
                <input type="text" name="user_address" id="user_address" placeholder="Rua - Nº"> <br>
                    </div>
            </div>
                
            <div class="input-label">
              <div class="label">
                <label for="user_tel">Telefone / Celular:</label>
                        </div>
            <div class="input">
                <input type="tel" name="user_tel" id="user_tel"> <br>
                     </div>
            </div>
             
            <div class="input-label">
              <div class="label">
                <label for="user_curso">Curso:</label>
                        </div>
            <div class="input">
           <select name="user_curso" id="user_curso">
                <option value="violin">Violino</option>
                <option value="cello">Violoncelo</option>
                <option value="guitar">Violão</option>
                <option value="drums">Bateria</option>
                <option value="piano">Piano</option>
                <option value="saxophone">Saxofone</option>
            </select> <br>
                   </div>
            </div>
                
            <div class="input-label">
              <div class="label">
                <label for="user_instrutor">Instrutor:</label>
                        </div>
            <div class="input">
             <select name="user_instrutor" id="user_instrutor">
                <option value="beethoven">Beethoven</option>
                <option value="bach">Bach</option>
                <option value="mozart">Mozart</option>
                <option value="chopin">Chopin</option>
                <option value="liszt">Liszt</option>
                <option value="tchaikovsky">Tchaikovsky</option>
            </select> <br>
                   </div>
            </div>
                
            <div class="input-label">
              <div class="label">
              <label for="user_aulas">Aulas de : </label>
                        </div>
            <div class="input">
                <input type="checkbox" name="week_days" value="monday" id="monday"> <label for="monday">Segunda-Feira</label> 
                <input type="checkbox" name="week_days" value="tuesday" id="tuesday"> <label for="tuesday">Terça-Feira</label> 
                <input type="checkbox" name="week_days" value="wednesday" id="wednesday"> <label for="wednesday">Quarta-Feira</label> 
            <input type="checkbox" name="week_days" value="thursday" id="thursday"> <label for="thursday">Quinta-Feira</label> 
            <input type="checkbox" name="week_days" value="friday" id="friday"> <label for="friday">Sexta-Feira</label> <br>
                   </div>
            </div>
                
            <input type="submit" value="Enviar">
            <input type="reset" value="Limpar">
                
        </fieldset>
    </form>

    </body>
</html>
    
30.08.2016 / 17:51