Samuel Carlos Ribeiro Postado 1 hora atrás Denunciar Share Postado 1 hora atrás Boa noite Estou fazendo um estudo em PHP, HTML, CSS e MySql, mas quando executo o script no navegado não esta aplicando o arquivo CSS, sou amador nessas linguagem, espero que tenham paciência. Segue os Códigos: .PHP <?php session_start(); if (isset($_GET['nome'])) { $_SESSION['lista_tarefas'][] = $_GET['nome']; } if (isset($_SESSION['lista_tarefas'])) { $lista_tarefas = $_SESSION['lista_tarefas']; } else { $lista_tarefas = array(); } include "template.php"; ?> .HTML <html> <head> <meta charset="utf-8" /> <title>Gerenciador de Tarefas</title> <link rel="stylesheet" href="tarefas.css" type="text/css" /> </head> <body> <h1>Gerenciador de Tarefas</h1> <form> <fieldset> <legend>Nova tarefa</legend> <label> Tarefa: <input type="text" name="nome" /> </label> <input type="submit" value="Cadastrar" /> </fieldset> </form> <table> <tr> <th>Tarefas</th> </tr> <?php foreach ($lista_tarefas as $tarefa) : ?> <tr> <td><?php echo $tarefa; ?> </td> </tr> <?php endforeach; ?> </table> <label> Descrição (Opcional): <textarea name="descricao"></textarea> </label> <label> Prazo (Opcional): <input type="text" name="prazo" /> </label> <fieldset> <legend>Prioridade:</legend> <label> <input type="radio" name="prioridade" value="baixa" checked /> Baixa <input type="radio" name="prioridade" value="media" /> Média <input type="radio" name="prioridade" value="alta" /> Alta </label> </fieldset> <label> Tarefa concluída: <input type="checkbox" name="concluida" value="sim" /> </label> <input type="submit" value="Cadastrar" /> </body> </html> .CSS /* tarefas.css */ /* Estilo geral da página */ body { font-family: Arial, sans-serif; background-color: #f4f6f8; margin: 20px; color: #333; } /* Título */ h1 { text-align: center; color: #0077cc; } /* Formulário */ form { margin-bottom: 20px; } fieldset { border: 2px solid #0077cc; border-radius: 8px; padding: 15px; margin-bottom: 15px; background-color: #fff; } legend { font-weight: bold; color: #0077cc; } label { display: block; margin: 10px 0; } /* Campos de entrada */ input[type="text"], textarea { width: 95%; padding: 8px; margin-top: 5px; border: 1px solid #aaa; border-radius: 5px; } /* Botões */ input[type="submit"] { background-color: #0077cc; color: white; border: none; padding: 10px 15px; border-radius: 6px; cursor: pointer; } input[type="submit"]:hover { background-color: #005fa3; } /* Tabela de tarefas */ table { width: 100%; border-collapse: collapse; background: #fff; } th, td { border: 1px solid #ddd; padding: 10px; text-align: left; } th { background-color: #0077cc; color: white; } tr:nth-child(even) { background-color: #f9f9f9; } Citar Link para o comentário Compartilhar em outros sites More sharing options...
0 Marcelo_2 Postado 13 minutos atrás Denunciar Share Postado 13 minutos atrás Olá. Ta funcionando sim. você tem certeza que instalou o servidor (Apache ou Xampp)? Citar Link para o comentário Compartilhar em outros sites More sharing options...
Pergunta
Samuel Carlos Ribeiro
Boa noite
Estou fazendo um estudo em PHP, HTML, CSS e MySql, mas quando executo o script no navegado não esta aplicando o arquivo CSS, sou amador nessas linguagem, espero que tenham paciência.
Segue os Códigos:
.CSS /* tarefas.css */ /* Estilo geral da página */ body { font-family: Arial, sans-serif; background-color: #f4f6f8; margin: 20px; color: #333; } /* Título */ h1 { text-align: center; color: #0077cc; } /* Formulário */ form { margin-bottom: 20px; } fieldset { border: 2px solid #0077cc; border-radius: 8px; padding: 15px; margin-bottom: 15px; background-color: #fff; } legend { font-weight: bold; color: #0077cc; } label { display: block; margin: 10px 0; } /* Campos de entrada */ input[type="text"], textarea { width: 95%; padding: 8px; margin-top: 5px; border: 1px solid #aaa; border-radius: 5px; } /* Botões */ input[type="submit"] { background-color: #0077cc; color: white; border: none; padding: 10px 15px; border-radius: 6px; cursor: pointer; } input[type="submit"]:hover { background-color: #005fa3; } /* Tabela de tarefas */ table { width: 100%; border-collapse: collapse; background: #fff; } th, td { border: 1px solid #ddd; padding: 10px; text-align: left; } th { background-color: #0077cc; color: white; } tr:nth-child(even) { background-color: #f9f9f9; }
Link para o comentário
Compartilhar em outros sites
1 resposta a esta questão
Posts Recomendados
Participe da discussão
Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.