Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

195
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!