cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <div style="width:900px; text-align:left; margin: 0px auto 0px auto; padding:20px;">

<span class="navpart">Forms</span>

<br />

<div class="left">

<script>

function cupcake() { alert("It's a button!"); }

</script>

<button class="showbor" type="button" style="float:left; padding:5px 10px 10px 10px; text-align:center; margin:0px 20px 10px 0px;" onclick="cupcake();"> Button </button> 

<span class="bolet">Fields go inside the form tags: </span>
&nbsp;
&lt;form id="formid" action="#"&gt;
&nbsp;
&lt;/form&gt; 

<br />

<span class="bolet">Button:</span> 
&nbsp; 
&lt;button type="button" class="cssclass" onclick="function();"&gt;
&nbsp;
&lt;img src="pic.png" alt="" /&gt; Text &lt;/button&gt; 

<br />

<span class="bolet">Disable editing on field:</span> &nbsp; readonly="readonly"

<br />

<span class="bolet">Disable textarea resizing:</span> &nbsp; textarea { resize: none; }

<br />

<span class="bolet">Default check for checkbox and radio buttons:</span> 
&nbsp; checked="checked"

<br /><br />

<form action="#" style="float:right; margin:0px 0px 10px 20px;">
<input type="text" id="box1" class="showbor" style="width:200px; height:30px; border-radius: 20px 20px 20px 20px / 20px 20px 20px 20px; text-align:center;" value="This is a text box." /> </form> 

<span class="bolet">Text box:</span> &nbsp;
document.getElementById("boxname").value
<br />
&lt;input class="cssclass" id="boxid" value="content" type="text" /&gt;

<br /><br />

<textarea class="showbor" style="border-radius: 20px 20px 20px 20px / 20px 20px 20px 20px; text-align:center; resize: none; padding:5px; width:200px; float:left; margin:0px 20px 10px 0px;" id="area1" rows="3" cols="35"> This is a textarea. </textarea> 

<span class="bolet">Text area:</span> &nbsp; 
document.getElementById("areaname").value
<br /> 
&lt;textarea class="cssclass" id="areaid" rows="3" cols="25"&gt; Message (value) &lt;/textarea&gt;

<br /><br />

<table class="showbor" style="float:right; margin:0px 0px 10px 20px;"><tr>
<td><input type="text" class="focu" value="001" style="background-image:none;" /></td>
<td><input type="text" class="focu" value="002" style="background-image:none;" /></td>
<td><input type="text" class="focu" value="003" style="background-image:none;" /></td>
<td><input type="text" class="focu" value="004" style="background-image:none;" /></td>
</tr></table>

<span class="bolet">Focus:</span> &nbsp; input:focus { css here } &nbsp; (changes while it's selected)

<br /><br />

<div class="showbor" style="display:inline-block; float:left; margin:0px 20px 10px 0px; padding:5px;">

<script>

function checkit() { var flavors = "";

if (document.getElementById("check1").checked==true) { flavors = flavors + "Chocolate "; }

if (document.getElementById("check2").checked==true) { flavors = flavors + "Cookiesn'Cream "; }

if (document.getElementById("check3").checked==true) { flavors = flavors + "Brownie "; }

alert("Flavors selected: " + flavors); }

</script>

<table> <tr> 

<td colspan="5"> Icecream flavor: </td>

</tr> <tr>

<td> <input type="checkbox" id="check3" checked="checked" /> Brownie </td>

<td style="width:10px;">&nbsp;</td>

<td> <input type="checkbox" id="check1" /> Chocolate </td>

<td style="width:10px;">&nbsp;</td>

<td> <input type="checkbox" id="check2" /> Cookiesn'Cream </td>

</tr> <tr>

<td colspan="5"> <span class="textlink" onclick="checkit();">Go!</span> </td>

</tr> </table> </div>

<span class="bolet">Check boxes and radio buttons:</span> 
&nbsp;
document.getElementById("idname").checked==true
&nbsp;
document.getElementById("idname").checked==false

<br /><br />

<span class="bolet">Check box:</span>
&nbsp;
&lt;input type="checkbox" id="cbid" /&gt; 

<br /><br />

<div class="showbor" style="display:inline-block; float:right; margin:0px 0px 10px 20px; padding:5px;">

<script>

function radioit() { var goodtime = "";

if (document.getElementById("radi1").checked==true) { goodtime = "Play videogames"; }

if (document.getElementById("radi2").checked==true) { goodtime = "Watch anime"; }

if (document.getElementById("radi3").checked==true) { goodtime = "Draw fanart"; }

alert("I think I'll... " + goodtime); }

</script>

<table> <tr> 

<td colspan="5"> What now? </td>

</tr> <tr>

<td> <input type="radio" name="radstuff" id="radi1" /> Videogames </td>

<td style="width:10px;">&nbsp;</td>

<td> <input type="radio" name="radstuff" id="radi2" /> Anime </td>

<td style="width:10px;">&nbsp;</td>

<td> <input type="radio" name="radstuff" id="radi3" checked="checked" /> Fanart </td>

</tr> <tr>

<td colspan="5"> <span class="textlink" onclick="radioit();">Go!</span> </td>

</tr> </table> </div>

<span class="bolet">Radio button:</span>
&nbsp; 
&lt;input type="radio" name="radname" id="rad1" /&gt; 
&nbsp; 
&lt;input type="radio" name="radname" id="rad2" /&gt; 

<br /><br />

<div class="showbor" style="display:inline-block; float:left; margin:0px 20px 10px 0px; padding:5px;">

<script>

function comboit() { alert("I want... " + document.getElementById("combo").value + "!"); }

</script>

<table> <tr> <td>

<select class="showbor" id="combo" style="width:200px; text-align:center;">
<option style="padding:10px;" value="something chocolatey">Snack?</option>
<option style="padding:10px;" value="cake">cake</option>
<option style="padding:10px;" value="cookies">cookies</option>
<option style="padding:10px;" value="icecream">icecream</option> 
</select> 

</td>

<td style="width:20px;">&nbsp;</td>

<td> <span class="textlink" onclick="comboit();">Go!</span> </td>

</tr> </table> </div>

<span class="bolet">Combo box:</span> &nbsp; 
document.getElementById("comboname").value
<br />
&lt;select class="cssclass" id="comboid"&gt;
&nbsp;
&lt;option value="nothing_selected" class="cssclass"&gt;Question?&lt;/option&gt;
&nbsp;
&lt;option value="variable_value" class="cssclass"&gt;Option 1&lt;/option&gt;
&nbsp;
&lt;option value="variable_value" class="cssclass"&gt;Option 2&lt;/option&gt;
&nbsp;
&lt;option value="variable_value" class="cssclass"&gt;Option 3&lt;/option&gt;
&nbsp;
&lt;/select&gt; 

<br /><br />

<span class="bolet">PHP Email Form:</span> The fields in the form need to coincide with the code that will process them. In mailer.php the first part transfers the information from the form into variables. Next, there's the email it will be sent to and the subject of the email. The following paragraph replaces certain characters and limits the length of fields for security. Finally, the variables are placed into the email and sent. The auto reply is optional and can be removed. 

<br /><br />

&lt;form name="mailing" action="mailer.php" method="post"&gt; 
&nbsp;
&lt;input name="uname" id="uname" value="Name: " type="text" /&gt;
&nbsp;
&lt;input name="umail" id="umail" value="Email: " type="text" /&gt; 
&nbsp;
&lt;input name="usite" id="usite" value="Site: " type="text" /&gt; 
&nbsp;
&lt;input name="ururl" id="ururl" value="URL: " type="text" /&gt; 
&nbsp;
&lt;textarea name="uspeak" id="uspeak" rows="3" cols="22"&gt;Message: &lt;/textarea&gt; 
&nbsp;
&lt;input type="submit" value="Send" /&gt; 
&nbsp; 
&lt;/form&gt; 

<br /><br />

<span style="font-weight:bold; font-style:italic;">mailer.php</span> 
<br />

&lt;?php 
&nbsp; 
$yourname = $_POST['uname']; 
&nbsp;
$youremail = $_POST['umail']; 
&nbsp;
$thesite = $_POST['usite']; 
&nbsp;
$thesurl = $_POST['ururl']; 
&nbsp;
$speak = $_POST['uspeak']; 
<br />

$to = '<span style="font-weight:bold; font-style:italic;">YOUR EMAIL</span>';
&nbsp;
$email_subject = "<span style="font-weight:bold; font-style:italic;">EMAIL SUBJECT</span>";
<br />

$yourname = str_replace("="," ",$yourname);
&nbsp;
$yourname = str_replace("\"","\&amp;quot\;",$yourname);
&nbsp;
$yourname = substr($yourname, 0, 30);
<br />

$youremail = str_replace("="," ",$youremail);
&nbsp;
$youremail = str_replace("\"","\&amp;quot\;",$youremail);
&nbsp;
$youremail = substr($youremail, 0, 50);
<br />

$thesite = str_replace("="," ",$thesite);
&nbsp;
$thesite = str_replace("\"","\&amp;quot\;",$thesite);
&nbsp;
$thesite = substr($thesite, 0, 30);
<br />

$thesurl = str_replace("="," ",$thesurl);
&nbsp;
$thesurl = str_replace("\"","\&amp;quot\;",$thesurl);
&nbsp;
$thesurl = substr($thesurl, 0, 100);
<br />

$speak = str_replace("="," ",$speak);
&nbsp;
$speak = str_replace("\"","\&amp;quot\;",$speak);
&nbsp;
$speak = substr($speak, 0, 7000);
<br />
	
$email_body = "Name: $yourname \n Email: $youremail \n Site: $thesite \n Url: $thesurl \n Message: $speak";
&nbsp;
mail($to,$email_subject,$email_body);
<br />
	
$autoreply = "<span style="font-weight:bold; font-style:italic;">AUTO REPLY TEXT</span>";
<br />

$yourmail = $youremail;
&nbsp;
$yourmail = str_replace('Email: ', '', $yourmail);
&nbsp;
$yourmail = str_replace('Email:', '', $yourmail);
<br />

mail($yourmail,'<span style="font-weight:bold; font-style:italic;">AUTO REPLY SUBJECT</span>',$autoreply);
<br />

header('Location:<span style="font-weight:bold; font-style:italic;">URL AFTER EMAIL IS SENT</span>'); &nbsp; ?&gt;
<br />

<span style="font-style:italic;">(Error page CSS & HTML goes here.)</span>

</div>
<br />
<a href="http://azurelight.net">AzureLight.net</a> | 
<a href="http://mikaristar.deviantart.com">MikariStar.DeviantArt.com</a> | 
<a href="http://artrift.com/Mikari/">ArtRift.com/Mikari/</a> | 
<a href="http://miliazure.wordpress.com">MiliAzure.WordPress.com</a>
</div>
            
          
!
            
              input.focu { text-align:center; border-radius: 20px 20px 20px 20px / 20px 20px 20px 20px; 
border:0px none; background-color:#87cefa; color:#0047ab; width:50px; padding:5px; margin:7px; }

input.focu:focus { background-color:#0047ab; color:#87cefa; }

body { padding:0px; margin:0px; font-family:Arial; font-size:14px; line-height:20px; 
color:#393939; background-color:#c2f0ff; text-align:center; }

::-webkit-scrollbar { width: 10px; height:10px; }
::-webkit-scrollbar-track { background-color:#c2f0ff; }
::-webkit-scrollbar-thumb { border-radius: 20px; background-color:#ff9adc; border: 0px none; }

.showbor { border:0px none; border:3px dotted #ff9adc; padding:0px; } 

a, span.textlink { color:#ff71ce; text-decoration:none; }

input, textarea, select, option, button { color:#393939;
font-family:Arial; font-size:14px; line-height:17px;
overflow:hidden; background-color: #fff8bb;  
border-radius: 30px 30px 30px 30px / 30px 30px 30px 30px; } 

*:focus { outline:none; }
            
          
!
999px
Loading ..................

Console