Formulário em PHP com CSS
Autor: Eduardo Vieira | Publicado: 2014-04-03T14:16:00-07:00

Olá galera do PHP!
Bom algumas pessoas me perguntam como cria um FORM em PHP com CSS...
Então vamos lá:
Primeiro vamos Criar o arquivo index.php

&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;&lt;html&gt;&lt;head&gt;&lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"&gt;&lt;link rel="stylesheet" type="text/css" href="css_form.css"&gt;&lt;title&gt;Cadastro No Site&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;h2&gt;Cadastro no site&lt;/h2&gt;&lt;form id="form1" name="form1" method="post" action=""&gt;&nbsp; &lt;label&gt;Nome: *&lt;br&gt;&nbsp; &lt;input type="text" name="txtlNome" id="txtlNome" required&gt;&nbsp; &lt;/label&gt;&nbsp; &lt;label&gt;&nbsp; &lt;br&gt;&nbsp; Sobre Nome: *&lt;br&gt;&nbsp; &lt;input type="text" name="txtSobreNome" id="txtSobreNome" required&gt;&nbsp; &lt;/label&gt;&nbsp; &lt;label&gt;&lt;br&gt;&nbsp; E-mail: *&lt;br&gt;&nbsp; &lt;input type="text" name="txtemail" id="txtemail" required&gt;&nbsp; &lt;br&gt;&nbsp; Usu&amp;aacute;rio: *&lt;br&gt;&nbsp; &lt;input type="text" name="txtUser" id="txtUser" required&gt;&nbsp; &lt;/label&gt;&nbsp; &lt;label&gt;&lt;br&gt;&nbsp; Senha: *&lt;br&gt;&nbsp; &lt;input type="password" name="txtSenha" id="txtSenha" required&gt;&nbsp; &lt;br&gt;&nbsp; &lt;br&gt;&nbsp; &lt;/label&gt;&nbsp; &lt;input name="button" type="submit" class="botaoForm" id="button" value="Enviar"&gt;&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;

Usei um típico formulário de Cadastro para mostrar como funciona o CSS veja que eu marquei o arquivo CSS no texto...

Vamos agora Criar o arquivo css_form.css

/* CSS Document */body{&nbsp;&nbsp;&nbsp; font-family:Arial, Helvetica, sans-serif;&nbsp;&nbsp;&nbsp; color:#036;}form label {&nbsp;&nbsp;&nbsp; font-family:Arial, Helvetica, sans-serif;&nbsp;&nbsp;&nbsp; font-size:14px;&nbsp;&nbsp;&nbsp; color:#036;&nbsp;&nbsp;&nbsp; font-weight:bold;&nbsp;&nbsp;&nbsp; } form input[type="text"] {&nbsp;&nbsp;&nbsp; background-color:#f2f2f2;&nbsp;&nbsp;&nbsp; border:1px solid #000;&nbsp;&nbsp;&nbsp; padding:5px;&nbsp;&nbsp;&nbsp; width:350px;}form input[type="text"]:hover {&nbsp;&nbsp;&nbsp; background-color:#e1e1e1;&nbsp;&nbsp;&nbsp; border:1px solid #333;&nbsp;&nbsp;&nbsp; padding:5px;}form input[type="text"]:focus {&nbsp;&nbsp;&nbsp; background-color:#FFFFFF;&nbsp;&nbsp;&nbsp; border:1px solid #900;&nbsp;&nbsp;&nbsp; padding:7px;}&nbsp;form input[type="password"] {&nbsp;&nbsp;&nbsp; background-color:#f2f2f2;&nbsp;&nbsp;&nbsp; border:1px solid #000;&nbsp;&nbsp;&nbsp; padding:5px;&nbsp;&nbsp;&nbsp; width:350px;}form input[type="password"]:hover {&nbsp;&nbsp;&nbsp; background-color:#e1e1e1;&nbsp;&nbsp;&nbsp; border:1px solid #333;&nbsp;&nbsp;&nbsp; padding:5px;}form input[type="password"]:focus {&nbsp;&nbsp;&nbsp; background-color:#FFFFFF;&nbsp;&nbsp;&nbsp; border:1px solid #900;&nbsp;&nbsp;&nbsp; padding:7px;}.botaoForm {&nbsp;&nbsp;&nbsp; padding:5px;&nbsp;&nbsp;&nbsp; background-color:#036;&nbsp;&nbsp;&nbsp; border:1px solid #000;&nbsp;&nbsp;&nbsp; color:#fff;&nbsp;&nbsp;&nbsp; font-weight:bold;}&nbsp; 



pronto! ai esta um modelo de form php com css

ate a próxima...&nbsp;