Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

198
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda