Menu
Hi,
[code]
<hr>
Above is horizontal line in html 5.
So, how to do vertical line in html 5 only ?
Then, how to do it in css too in simplest form ?
>@novice2022#1644911 Then, how to do it in css too in simplest form ?
hr
[code=html]
<h1>Here comes a line</h1>
<hr style="height:200px;width:4px;background-color:green;margin-left:2em">
<p>Ta-da!</p>
[/code]
<hr>
<i>
</i><div style="display:flex;">
<i>
</i>//ADD HTML OPENING TAG HERE
<head>
1a.
<br>
<div style="display:flex;">
<div>
<form method="POST" name="text_field_maker" id="text_field_maker" action="">
<fieldset>
<label for="text_field_label">Text Field Label:</label><br>
<input type="text" name="text_field_label" id="text_field_label" minlength = "2" maxlength="40" size="25" title="Minimum 2 characters, Maximum 40 characters" required>
<br>
<label for="text_field_title">Text Field Title:</label><br>
<input type="text" name="text_field_title" id="text_field_title" minlength = "2" maxlength="40" size="25" title="Minimum 2 characters, Maximum 40 characters" required>
<br>
<button type="reset" name='text_field_maker_reset_button' id='text_field_maker_reset_button'>Reset</button>
<button type="submit" name='text_field_maker_submit_button' id='text_field_maker_submit_button'>Submit</button><br>
</fieldset>
</form>
</div>
<hr>
<div>
2nd div code goes here. This div is like the code browser.
</div>
//ADD HTML CLOSING TAG HERE
<i>
</i>
//ADD PHP OPENING TAG HERE
session_start();
//ADD PHP CLOSING TAG HERE
//ADD HTML OPENING TAG HERE
<head>
1a.
<br>
<div style="display:flex;">
<div>
<form method="POST" name="text_field_maker" id="text_field_maker" action="">
<fieldset>
<label for="text_field_label">Text Field Label:</label><br>
<input type="text" name="text_field_label" id="text_field_label" minlength = "2" maxlength="40" size="25" title="Minimum 2 characters, Maximum 40 characters" required>
<br>
<label for="text_field_title">Text Field Title:</label><br>
<input type="text" name="text_field_title" id="text_field_title" minlength = "2" maxlength="40" size="25" title="Minimum 2 characters, Maximum 40 characters" required>
<br>
<button type="reset" name='text_field_maker_reset_button' id='text_field_maker_reset_button'>Reset</button>
<button type="submit" name='text_field_maker_submit_button' id='text_field_maker_submit_button'>Submit</button><br>
</fieldset>
</form>
</div>
<hr>
<div>
//ADD PHP OPENING TAG HERE
if($_SERVER['REQUEST_METHOD']=='POST')
{
if(ISSET($_POST['text_field_maker_submit_button']))
{
$text_field_label = ucwords($_POST['text_field_label']);
$text_field_id = str_replace(' ','',ucwords($_POST['text_field_label']));
$text_field_name = str_replace(' ','_',strtolower($_POST['text_field_label']));
$text_field_title = ucfirst($_POST['text_field_title']);
<i> </i> if(EMPTY($_SESSION['html_form_builder']))
<i> </i> {
<i> </i> echo __LINE__; echo '<br>';
<i> </i> $_SESSION['html_form_builder'] =
<i> </i>
<i> </i> "<form method='POST' name='html_form_builder' id='html_form_builder' action=''>
<i> </i> <label for="$text_field_label">$text_field_label:</label><br>
<i> </i> <input type='text' name="$text_field_name" id="$text_field_id" minlength = '2' maxlength='40' size='25' title="$text_field_title" required>
<i> </i> </form>
<i> </i> ";
<i> </i> echo $_SESSION['html_form_builder'];
<i> </i> }
<i> </i> else
<i> </i> {
<i> </i> $_SESSION['html_form_builder_new'] =
<i> </i> $_SESSION['html_form_builder'] = str_replace('</form>','', $_SESSION['html_form_builder']);
<i> </i> //$_SESSION['html_form_builder'] = str_replace('</form>','', $_SESSION['html_form_builder']);
<i> </i> //$_SESSION['html_form_builder'] = str_replace('</ol>','', $_SESSION['html_form_builder']);
<i> </i> $_SESSION['html_form_builder_new'] = '<br>'.
<i> </i> "
<i> </i> <label for="$text_field_label">$text_field_label:</label><br>
<i> </i> <input type='text' name="$text_field_name" id="$text_field_id" minlength = '2' maxlength='40' size='25' title="$text_field_title" required>
<i> </i> </form>
<i> </i> ";
<i> </i> //$_SESSION['html_form_builder'] . $_SESSION['html_form_builder_new'];
<i> </i> echo $_SESSION['html_form_builder'] .= $_SESSION['html_form_builder_new'];
<i> </i> unset($_SESSION['html_form_builder_new']);
<i> </i> }
<i> </i>}
}
//ADD PHP CLOSING TAG HERE
</div>
</div>
<br>
<form method="POST" name="save_form" id="save_form" action="">
<fieldset>
<label for="form_name">Form Name</label><br>
<input type="text" name="form_name" id="form_name" minlength = "2" maxlength="40" size="25" title="Minimum 2 characters, Maximum 40 characters">
<br>
<button type="submit" name='reset_form_button' id='reset_form_button'>Reset Form</button>
<button type="submit" name='save_form_button' id='save_form_button'>Save Form</button><br>
<br>
</fieldset>
</form>
</head>
//ADD HTML CLOSING TAG HERE
//ADD PHP OPENING TAG HERE
if($_SERVER['REQUEST_METHOD']=='POST')
{
if(ISSET($_POST['reset_form_button']))
{
session_destroy();
}
elseif(ISSET($_POST['save_form_button']))
{
if(!ISSET($_SESSION['html_form_builder']) && EMPTY($_SESSION['html_form_builder']))
{
die('ERROR ALERT: Build your form first before trying to save it!');
}
<i> </i> //$_SESSION['html_form_builder'] =
<i> </i> $_SESSION['html_form_builder'] = str_replace('</form>','</fieldset>', $_SESSION['html_form_builder']);
<i> </i> //$_SESSION['html_form_builder'] = str_replace('</form>','', $_SESSION['html_form_builder']);
<i> </i> //$_SESSION['html_form_builder'] = str_replace('</ol>','', $_SESSION['html_form_builder']);
<i> </i> $_SESSION['html_form_builder_new'] =
<i> </i> $_SESSION['html_form_builder'] = str_replace("<form method='POST' name='html_form_builder' id='html_form_builder' action=''>","<form method='POST' name='html_form_builder' id='html_form_builder' action=''><fieldset>", $_SESSION['html_form_builder']);
<i> </i> //$_SESSION['html_form_builder'] = str_replace('<ol>',' ', $_SESSION['html_form_builder']);
<i> </i> //$_SESSION['html_form_builder'] = str_replace('</ol>',' ', $_SESSION['html_form_builder']);
<i> </i> //$_SESSION['html_form_builder'] = str_replace('</form>',' ', $_SESSION['html_form_builder']);
<i> </i> $_SESSION['html_form_builder'] .= '<br>'.
<i> </i> "
<i> </i> <button type='submit' name='reset_form_button' id='reset_form_button'>Reset Form</button>
<i> </i> <button type='submit' name='save_form_button' id='save_form_button'>Save Form</button><br>
<i> </i> </fieldset>
<i> </i> </form>
<i> </i> ";
<i> </i> echo $_SESSION['html_form_builder'];
<i> </i>}
}
//ADD PHP CLOSING TAG HERE
<i>
</i>
//ADD PHP STARTING TAG HERE
session_start();
$form_name = 'untitled_form';
$form_id = 'untitled_form';
//ADD PHP CLOSING TAG HERE
//ADD HTML STARTING TAG HERE
<head>
<title>Admin Account</title>
</head>
<body>
<br>
<div name="form_editor" style="display:flex;">
<form method="POST" name="text_field_maker" id="text_field_maker" action="">
<fieldset>
<legend><b>Text Field Properties</b></legend>
<label for="text_field_label"><b>Label:</b></label><br>
<input type="text" name="text_field_label" id="text_field_label" minlength = "2" maxlength="40" size="25" title="Minimum 2 characters, Maximum 40 characters" required>
<br>
<label for="text_field_type"><b>Type:</b></label><br>
<select name="text_field_type" id="text_field_type" required>
<option value=""></option>
<option value="text">Text</option>
<option value="email">Email</option>
<option value="url">Url</option>
</select>
<br>
<label for="text_field_title"><b>Title:</b></label><br>
<input type="text" name="text_field_title" id="text_field_title" minlength = "2" maxlength="40" size="25" title="Minimum 2 characters, Maximum 40 characters" required>
</fieldset>
<fieldset>
<button type="reset" name="text_field_maker_reset_button" id="text_field_maker_reset_button">Reset</button>
<button type="submit" name="text_field_maker_submit_button" id="text_field_maker_submit_button">Make</button><br>
</fieldset>
</form>
//ADD PHP STARTING TAG HERE
Do not put closing </div> here.
//ADD PHP CLOSING TAG HERE
<hr>
<div name="form_preview">
//ADD PHP STARTING TAG HERE
if($_SERVER['REQUEST_METHOD'] == 'POST')
{
//echo __LINE__; echo '<br>';
<i> </i>if(ISSET($_POST['form_generator_reset']))
<i> </i>{
<i> </i> session_destroy();
<i> </i>}
<i> </i>elseif(ISSET($_POST['text_field_maker_submit_button']))
<i> </i>{
<i> </i> //echo __LINE__; echo '<br>';
<i> </i>
<i> </i> $text_field_label = trim($_POST['text_field_label']);
<i> </i> $text_field_label = strtolower($text_field_label);
<i> </i> $text_field_label = ucwords($text_field_label);
<i> </i> $text_field_label = str_replace('_',' ',$text_field_label);
<i> </i> $text_field_label = strip_tags($text_field_label);
<i> </i>
<i> </i> $text_field_name_1 = trim($_POST['text_field_label']);
<i> </i> $text_field_name_2 = strtolower($text_field_name_1);
<i> </i> $text_field_name_3 = str_replace(' ','_',$text_field_name_2);
<i> </i> $text_field_name = strip_tags($text_field_name_3);
<i> </i>
<i> </i> $text_field_id_1 = trim($_POST['text_field_label']);
<i> </i> $text_field_id_2 = strtolower($text_field_id_1);
<i> </i> $text_field_id_3 = str_replace(' ','',$text_field_id_2);
<i> </i> $text_field_id_4 = str_replace('_','',$text_field_id_3);
<i> </i> $text_field_id = strip_tags($text_field_id_4);
<i> </i>
<i> </i> $text_field_title = trim(strip_tags($_POST['text_field_title']));
<i> </i>
<i> </i> $text_field_type = trim($_POST['text_field_type']);
<i> </i>
<i> </i> //$_SESSION['text_field_label'] = $_POST['text_field_label']; //DUPLICATE SIMILAR TO THIS ON ALL OTHER INPUT TYPES SECTIONS.
<i> </i>
<i> </i> if(!ISSET($_SESSION['form_code']) || EMPTY($_SESSION['form_code']))
<i> </i> {
<i> </i> //echo __LINE__; echo '<br>';
<i> </i>
<i> </i> $_SESSION['form_code'] = '<form>
<i> </i> <fieldset>
<i> </i> <label for=' .'"' .$text_field_name .'"' .'>' .$text_field_label .':' .'</label><br>
<i> </i> <input type=' .'"' .$text_field_type .'"' .' name=' .'"' .$text_field_name .'"' .' id=' .'"' .$text_field_id .'"' .' minlength=' .'"' .'2' .'"' .' maxlength=' .'"' .'40' .'"' .' size=' .'"' .'5' .'"' .' title=' .'"' .$text_field_title .'"' .' required>'
<i> </i> .'</fieldset>
<i> </i> </form>
<i> </i> ';
<i> </i>
<i> </i> echo $_SESSION['form_code'];
<i> </i> }
<i> </i> else
<i> </i> {
<i> </i> //echo __LINE__; echo '<br>';
<i> </i>
<i> </i> $_SESSION['form_code'] = str_replace('</form>','',$_SESSION['form_code']);
<i> </i> $_SESSION['form_code'] .= '<fieldset>
<i> </i> <label for=' .'"' .$text_field_name .'"' .'>' .$text_field_label .':' .'</label><br>
<i> </i> <input type=' .'"' .$text_field_type .'"' .' name=' .'"' .$text_field_name .'"' .' id=' .'"' .$text_field_id .'"' .' minlength=' .'"' .'2' .'"' .' maxlength=' .'"' .'40' .'"' .' size=' .'"' .'5' .'"' .' title=' .'"' .$text_field_title .'"' .' required>'
<i> </i> .'</fieldset>
<i> </i> </form>';
<i> </i>
<i> </i> echo $_SESSION['form_code'];
<i> </i> }
<i> </i>}
<i> </i>elseif(ISSET($_POST['form_generator_save']) && ISSET($_SESSION['form_code']) && !EMPTY($_SESSION['form_code']))
<i> </i>{
<i> </i> //echo __LINE__; echo '<br>';
<i> </i>
<i> </i> $form_name = $_POST['form_name'];
<i> </i> $_SESSION['form_code'] = str_replace('</form>','',$_SESSION['form_code']);
<i> </i> $_SESSION['form_code'] .= '<fieldset>
<i> </i> <button type=' .'"' .'submit' .'"' .' name=' .'"' .'form_demo_reset' .'"' .'id=' .'"' .'form_demo_reset' .'"' .'>Reset Form</button>
<i> </i> <button type=' .'"' .'submit' .'"' .' name=' .'"' .'form_demo_submit' .'"' .' id=' .'"' .'form_demo_submit' .'"' .'>Save Form</button><br>
<i> </i> </fieldset>
<i> </i> </form>';
<i> </i>
<i> </i> $_SESSION['form_code'] = str_replace('<form>','<form method=' .'"' .'POST' .'"' .' name=' .'"' .$form_name .'"' .' id=' .'"' .$form_id .'"' .' action=' .'""' .'>' .'<legend><b>Form: ' .$form_name .'</b></legend>',$_SESSION['form_code']);
<i> </i> echo $_SESSION['form_code'];
<i> </i>
//ADD PHP CLOSING TAG HERE
<i> </i> <div name="">
<i> </i> <hr>
<i> </i> <textarea name="form_code" id="form_code">
<i> </i>
<i> </i> //ADD PHP OPENING TAG HERE
<i> </i> echo htmlspecialchars($_SESSION['form_code']);
<i> </i>
<i> </i> //ADD PHP CLOSING TAG HERE
<i> </i> <textarea>
<i> </i> </div>
<i> </i>
<i> </i> //ADD PHP STARTING TAG HERE
<i> </i>
<i> </i> session_destroy();
<i> </i>}
}
//ADD PHP CLOSING TAG HERE
</div>
</div>
<hr>
<div name='form_saver'>
<br>
<form method="POST" name="form_generator" id="form_generator" action="">
<fieldset>
<legend><b>
//ADD PHP OPENING TAG HERE
echo "Form: <i><b>$form_name</b></i>";
//ADD PHP CLOSING TAG HERE
</b></legend>
<label for="form_name"><b>Form Name:</b></label><br>
<input type="text" name="form_name" id="form_id" minlength = "2" maxlength="40" size="25" title="Input between 8 to 40 characters for your Form Name." value="
//ADD PHP OPENING TAG HERE
echo $form_name;
//ADD PHP CLOSING TAG HERE
"
required>
</fieldset>
<fieldset>
<button type="submit" name="form_generator_reset" id="form_generator_reset">Reset Form</button>
//ADD PHP OPENING TAG HERE
//Do not change the button type from 'submit' to 'reset' as need to detect this button as a submit to destroy session to erase the generated form.
//ADD PHP CLOSING TAG HERE
<i> </i><button type="submit" name="form_generator_save" id="form_generator_save">Save Form</button><br>
</fieldset>
</form>
<br>
</div>
</body>
//ADD HTML CLOSING TAG HERE
<i>
</i><div style="display:flex;">
>@novice2022#1645045 But how would you write texts on left & right sides of the vertical line.
> And ontop and on bottom of it too ?
> Do check my latest posts.
>@novice2022#1645106 I do not know how to use jsfiddle.
<i>
</i>
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<title>Title</title>
</head>
<body>
<style>
.container {
height: 90vh;
width: 90vw;
margin: 2rem auto;
display: grid;
grid-template-areas: "header header header"
"left main right"
"footer footer footer";
grid-template-rows: 1fr 3fr 1fr;
grid-template-columns: 1fr 2fr 1fr;
}
.cell-1 {
background: deepskyblue;
grid-area: header;
}
.cell-2 {
background: orangered;
grid-area: left;
}
.cell-3 {
background: limegreen;
grid-area: main;
}
.cell-4 {
background: gold;
grid-area: right;
}
.cell-5 {
background: blueviolet;
grid-area: footer;
}
.cell {
color: white;
font-size: 2.5rem;
text-align: center;
padding: 4rem;
}
</style>
</body>
</html>
[code]
The stupid tutorial did not say what to save as and just gave this code:
[code]
.container {
height: 90vh;
width: 90vw;
margin: 2rem auto;
display: grid;
grid-template-areas: "header header header"
"left main right"
"footer footer footer";
grid-template-rows: 1fr 3fr 1fr;
grid-template-columns: 1fr 2fr 1fr;
}
.cell-1 {
background: deepskyblue;
grid-area: header;
}
.cell-2 {
background: orangered;
grid-area: left;
}
.cell-3 {
background: limegreen;
grid-area: main;
}
.cell-4 {
background: gold;
grid-area: right;
}
.cell-5 {
background: blueviolet;
grid-area: footer;
}
.cell {
color: white;
font-size: 2.5rem;
text-align: center;
padding: 4rem;
}
<i>
</i>.container {
height: 90vh;
width: 90vw;
margin: 2rem auto;
display: grid;
grid-template-areas: "header header header"
"left main right"
"footer footer footer";
grid-template-rows: 1fr 3fr 1fr;
grid-template-columns: 1fr 2fr 1fr;
}
.cell-1 {
background: deepskyblue;
grid-area: header;
}
.cell-2 {
background: orangered;
grid-area: left;
}
.cell-3 {
background: limegreen;
grid-area: main;
}
.cell-4 {
background: gold;
grid-area: right;
}
.cell-5 {
background: blueviolet;
grid-area: footer;
}
.cell {
color: white;
font-size: 2.5rem;
text-align: center;
padding: 4rem;
}
<i>
</i>
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<title>Title</title>
</head>
<body>
<style>
.container {
height: 90vh;
width: 90vw;
margin: 2rem auto;
display: grid;
grid-template-areas: "header header header"
"left main right"
"footer footer footer";
grid-template-rows: 1fr 3fr 1fr;
grid-template-columns: 1fr 2fr 1fr;
}
.cell-1 {
background: deepskyblue;
grid-area: header;
}
.cell-2 {
background: orangered;
grid-area: left;
}
.cell-3 {
background: limegreen;
grid-area: main;
}
.cell-4 {
background: gold;
grid-area: right;
}
.cell-5 {
background: blueviolet;
grid-area: footer;
}
.cell {
color: white;
font-size: 2.5rem;
text-align: center;
padding: 4rem;
}
</style>
<div class="container">
<div class="cell cell-1">1.</div>
<div class="cell cell-2">2.</div>
<div class="cell cell-3">3.</div>
<div class="cell cell-4">4.</div>
<div class="cell cell-5">5.</div>
<div class="cell cell-6">6.</div>
<div class="cell cell-7">7.</div>
<div class="cell cell-8">8.</div>
<div class="cell cell-9">9.</div>
</div>
</body>
</html>
>Did I do everything correct or foolishly missed something out ?
calc(50vw - 3px)
0.1.9 — BETA 4.24