My code displays this:
but I am not sure if I implemented the div and input form mixing properly.
Could you please comment if I am doing this in the correct way?
CSS:
.newstuff
{
width: 80%;
height: 100px;
}
.newstuff.left
{
float: left;
padding-left: 5px;
text-align: right;
width: 15%;
vertical-align: middle;
background: red;
}
.newstuff.center
{
float: left;
padding-left: 5px;
text-align: left;
width: 35%;
vertical-align: middle;
background: green;
}
.newstuff.right
{
float: left;
padding-left: 5px;
text-align: left;
width: 35%;
vertical-align: middle;
background: yellow;
}
.buttontest
{
float: left;
width: 35%;
}
PHP:
<?php
echo "<head>";
echo ' <link rel="stylesheet" href="test.css">';
echo "</head>";
echo '<body>';
echo '<div class="newstuff">';
echo ' <form action="'.htmlspecialchars($_SERVER["PHP_SELF"]).'" method="post" name="auth_form">';
echo '<div class="newstuff left">';
echo ' <input type="text" name="data1" placeholder="This is left">';
echo '</div>';
echo '<div class="newstuff center">';
echo '<textarea name="centertext" rows="5" cols="50" maxlength="255" placeholder="This is center"></textarea>';
echo '</div>';
echo '<div class="newstuff right">';
echo ' <input type="text" name="data3" placeholder="This is right">';
echo '</div>';
echo '</div>';
echo '<div class="buttontest">';
echo ' <input type="submit" name="test" value="Testing">';
echo " </form>";
echo '</div>';
echo "</body>";
?>