Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <body class="coloured_body">
	<h2>
		<center><!--center works, but use css please-->
		Happy Programming Survey
		</center>
	</h2>
	<div class="form_container">
		<form>
			<p>
				<label><b>Your Name</b><br/><input name="name" class="fit" type="text" placeholder="your name"/></label>
			</p>
			<p>
				<label><b>Your Email</b><br/><input name="email" class="fit" type="email" placeholder="your email"/></label>
			</p>
			<p><hr class="hr_lim75 lime_hr"/></p>
			<p><label><b>
				Your title</b><br/>
				<select class="fit">
					<option disabled selected>--select one--</option>
					<option>Beginner coder</option>
					<option>Experienced coder</option>
					<option>UI/UX coder</option>
					<option>Serious coder</option>
					<option>NONE</option>
				</select>
			</label></P>
			<p><hr class="hr_lim75 lime_hr"/></p>
<p><b>How much do you like FCC?</b></p>
				<p><label id="l0" class="cool_label">
	<input id="r0" class="hidden_radio" type="radio" name="cool"/>SO MUCH!
</label></p>
<p><label id="l1" class="cool_label">
	<input id="r1" class="hidden_radio" type="radio" name="cool"/>FCC IS LIFE
</label></p>
<p><label id="l2" class="cool_label">
	<input id="r2" class="hidden_radio" type="radio" name="cool"/>FCC FOREVER
</label></p>
			<p><hr class="hr_lim75 lime_hr"/></p>
<p>
	<label><b>Got any comment?</b></label><br/>
	<textarea class="fit" placeholder="your comment here"></textarea>
</p>
			<p>
				<input type="submit" class="submit_btn" value="Happy programming"/>
			</p>
			
		</form>
	</div>
<p><center>Happy programming survey.</center></p>
</body>
              
            
!

CSS

              
                body{
	margin:0;
}
*{
	font-family:sans-serif;
}
.lime_hr{
	border-color:#98cb0f;
	border-style:solid;
}
.submit_btn{
	background-color:#98cb0f;
	padding:0.5em;
	font-weight:bold;
	font-size:1.1em;/*10% bigger*/
	border:0.15em solid #6f9800;
	
}
.coloured_body{
	background-color:#eeffc1;
}
.fit{
	width:100%;
	box-sizing:border-box;
}
.submit_btn,input[type="email"],input[type="text"],select,textarea{
	padding:0.5em;
	border-radius:0.3em;
}
input[type="email"],input[type="text"],select,textarea{
	/*border:0.15em solid #98cb0f;*/
	border:0.15em solid #6f9800;
	
}
input:focus,textarea:focus,select:focus{
	background-color:#daff76;
	border-color:#98cb0f;
}
.form_container{
	text-align:center;
	max-width:6in;
	margin:auto auto;
	padding:2vw;
	background-color:white;
	border:0.2em solid #6f9800;
	border-left-width:0;
	border-right-width:0;
}
@media (min-width:6.3in){
	.form_container{
		border:0.2em solid #6f9800;
		box-shadow:0 0 0.3em #6f9800;
		border-radius:0.5em;
	}
}
.hr_lim75{
	width:75%;
}

.hidden_radio{
	display:none;/*remove it for debugging*/
}
.cool_label{
	padding:0.5em;
	margin:0.2em;
	display:block;
	border-style:solid;
	border-radius:0.5em;
	border-color:#6f9800;
	font-family:sans-serif;
	box-sizing:border-box;
	cursor:pointer;
}
.selected_radio{
	border-width:0.15em 0.3em 0.15em 0.3em;
	background-color:#98cb0f;
	border-color:#6f9800;
	font-weight:bold;
	transition: all 0.5s ease;
}
.not_selected_radio{
	background-color:white;
	border-width:0.15em;
	transition: all 0.5s ease;
}
              
            
!

JS

              
                //some hand of jquery
//list of radios
var active_class="selected_radio";
var disabled_class="not_selected_radio";
var radio_list=["r0","r1","r2"];
var label_list=["l0","l1","l2"];
function radios_changed(){
	for(var a=0;a<radio_list.length;a++){//for each element/radio
		var jel=$('#'+radio_list[a]);//accessing the radio
		var lel=$('#'+label_list[a]);//accessing the label/element to change
		// console.log(jel);//debugging
		if(jel.is(':checked')){//if selected
			lel.removeClass(disabled_class);
			lel.addClass(active_class);
		}else{
			lel.removeClass(active_class);
			lel.addClass(disabled_class);
		}//else-end
	}//for-end
}//func-end
//------------
function on_startup(){//applying event listeners
	for(var a=0;a<radio_list.length;a++){//for each radio
		var jel=$('#'+radio_list[a]);//accessing the element
		jel.change(function(){radios_changed();});
	}
	radios_changed();//default styling by start
}
on_startup();//called by startup to add event listeners, and apply default vals

              
            
!
999px

Console