Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

199
Visualizações
How do you style input that PHP posted with a CSS selector?

I want to create a webpage that posts onto itself text inserted into an input field, using CSS to stylize said text once it becomes part of the page. However, I don't know how to refer to it with a CSS selector. I've done what every HTML-newb tries when encountering a problem and wrapped both the form code and PHP statement in classified DIVs, however, the computer visibly doesn't know what I'm trying to address. Likewise, wrapping the PHP statement in paragraph tags doesn't apply to it the stylization said tags are associated with.

For Reference, Form & PHP Code:

<form method = "post">
<textarea name="input"></textarea>
<input type="submit">
</form>

<?php echo $_POST['input'];?>

My apologies if the solution to this is obvious; I can't find information addressing it.

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

you could inline style it or with a class.

<form method = "post">
  <textarea name="input"></textarea>
  <input type="submit" name="submit">
</form>
<div class="input-value">
<?php 
if(isset($_POST['submit])) {
  echo $_POST['input'];
}
?>
</div>

use .input-value class in css

over 4 years ago · Santiago Trujillo Relatório

0

Please try this!

<form method = "post">
<textarea name="input"></textarea>
<input type="submit">
</form>
<?php echo "<div style='color:red;font-family:verdana;font-size:300%'>" . 
$_POST['input'] . "</div>" ?>

Are you looking for this? Please let me know! Thanks!

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda