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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ 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

              
                <!DOCTYPE html>

<html>
<head>
	<base href="http://go.pardot.com">
	<meta charset="utf-8">
	<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
	<meta content="%%description%%" name="description">

	<title>Preferences Page</title>
	<link crossorigin="anonymous" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" rel="stylesheet">
	<meta content="noindex, nofollow" name="robots">
	<link href="https://go.pardot.com/css/form.css?ver=2020-10-19" rel="stylesheet" type="text/css">
</head>
<body class="bg-light">
	<div class="container">
		<div class="py-3">
			<div class="text-center">
				<img alt="" class="d-block mx-auto mb-4" src="https://via.placeholder.com/220x65.png?text=LOGO" width="250">

				<div>
					<div class="preference-container">
						<form accept-charset="UTF-8" action="xx" class="form" id="pardot-form" method="post" name="pardot-form">
							<p>Select which lists you would like to receive email communications from.</p>


							<ol class="switches">
								<li class="form-field pd-email required %%form-field-dependency-css%%">
									<label class="field-label" for="piEmailPrefEmail">Email Address</label> <input class="text" id="piEmailPrefEmail" name="piEmailPrefEmail" readonly="readonly" type="text" value="j******1@g*******l.com">

									<div id="error_for_piEmailPrefEmail" style="display:none">
									</div>
								</li>


								<li class="form-field %%form-field-class-type%% required %%form-field-dependency-css%%">
									<input id="piEmToken" name="piEmToken" readonly="readonly" type="hidden" value=""">

									<div id="error_for_piEmToken" style="display:none">
									</div>
								</li>


								<li class="form-field email-pref pd-checkbox %%form-field-dependency-css%%">
									<input id="list_111694" name="list[]" type="checkbox" value="111694" checked="checked">&nbsp;<label class="inline" for="list_111694">Conferences & Events</label> <span class="description">The latest updates on our events including webinars and our annual conference.</span>

									<div id="error_for_list_111694" style="display:none">
									</div>
								</li>


								<li class="form-field email-pref pd-checkbox %%form-field-dependency-css%%">
									<input id="list_111688" name="list[]" type="checkbox" value="111688">&nbsp;<label class="inline" for="list_111688">News & Updates</label> <span class="description">Get the best content right in your inbox.</span>

									<div id="error_for_list_111688" style="display:none">
									</div>
								</li>


								<li class="form-field email-pref pd-checkbox %%form-field-dependency-css%%">
									<input id="list_111692" name="list[]" type="checkbox" value="111692">&nbsp;<label class="inline" for="list_111692">Product Updates</label> <span class="description">Occasional emails about product releases and updates.</span>

									<div id="error_for_list_111692" style="display:none">
									</div>
								</li>


								<li class="form-field email-pref pd-checkbox %%form-field-dependency-css%%">
									<input id="list_111690" name="list[]" type="checkbox" value="111690" checked="checked">&nbsp;<label class="inline" for="list_111690">Weekly Blog Digest</label> <span class="description">Our latest blog posts delivered weekly to your inbox.</span>

									<div id="error_for_list_111690" style="display:none">
									</div>
								</li>


								<li class="form-field %%form-field-css-classes%% %%form-field-class-type%% no-label %%form-field-dependency-css%%">
									<a data-confirm="Are you sure you want to opt out from all future email communications?" href="">Opt out from all email communications</a>

									<div id="error_for_gUnsub" style="display:none">
									</div>
								</li>
							</ol>


							<p style="position:absolute; width:190px; left:-9999px; top: -9999px;visibility:hidden;"><label for="pi_extra_field">Comments</label> <input id="pi_extra_field" name="pi_extra_field" type="text"></p>
							<!-- forces IE5-8 to correctly submit UTF8 content  -->
							<input name="_utf8" type="hidden" value="&#9731;">

							<p class="submit"><input accesskey="s" type="submit" value="Save Preferences">
							</p>
							<script type="text/javascript">
							//<![CDATA[

							var anchors = document.getElementsByTagName("a");
							for (var i=0; i<anchors.length; i++) {
							 var anchor = anchors[i];
							 if(anchor.getAttribute("href")&&!anchor.getAttribute("target")) {
							     anchor.target = "_top";
							 }
							}
							 
							//]]>
							</script>
						</form>
					</div>
				</div>
			</div>
			
		</div>
	</div>
	<script src="https://code.jquery.com/jquery-latest.min.js"></script> 
			<script type="text/javascript">
			$( document ).ready(function() {
			   $('label').contents().each(function() {
			 if (this.nodeType == 3 && $.trim(this.nodeValue) != '') {
			    $(this).wrap('<span class="label-wrapper"><\/span>');
			 }
			});
			$('.label-wrapper').after('<span><\/span>');
			});
			</script> 
</body>
</html>
              
            
!

CSS

              
                * {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

ol {
  list-style: none;
}
label {
  cursor: pointer;
}
	           body form.form {
	   width:100%;
	   max-width:500px;
	   margin:0 auto;
	}
	body form.form p.no-label, 
	body form.form p.email-pref {
	   margin-left:0;
	}
	body form.form p label.inline {
	   font-size:15px;
	   color:#5d5c5c;
	}
	body form.form p.email-pref span.description {
	   font-size:13px;
	   color:#7b7a7a;
	}
	body form.form p label {
	   /* stack the label on top of the form field */
	   float:none;
	   text-align:left;
	   /* label font styling */
	   font-weight:normal;
	   font-size:15px;
	   padding-bottom:5px;
	   color:#5d5c5c;
	}
	/* hide the required star */
	body form.form p.required label, 
	body form.form span.required label {
	   background:none;
	}
	body form.form input.text {
	   width:100%; /* give it a width to be responsive */
	   padding:5px;
	}
	/* Submit button properties */
	body form.form p.submit input {
	   background:#56CFD2;
	   color:#FFF;
	   border:0;
	   padding:10px 35px;
	   font-style: normal;
	   font-weight: 800;
	   text-transform: uppercase;
	   line-height: 1.6923em;
	   letter-spacing: 2px;
	   cursor:pointer;
	}
	/* Submit button hover */
	body form.form p.submit input:hover {
	   background: #4ebfc2;
	}
	/* the submit button wrapper */
	body form.form p.submit {
	   margin-left:0; /* get rid of the default left margin */
	   width:100%;  /* give it a width in order to center the button */
	   text-align:center; /* center the button */
	}
#pardot-form p {
  margin-left:0;
  padding-left:0;
}
/* hide the checkbox */ 
[type="checkbox"] {
  position: absolute;
  left: -9999px;
}
/* Position the checkbox label */
.switches .pd-checkbox label {
  display: flex;
  align-items: center;
  justify-content: space-between;

}
/* Style the switch */
.switches .pd-checkbox label.inline span:last-child {
  position: relative;
  width: 50px;
  height: 26px;
  border-radius: 15px;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.4);
  background: #434257;
  transition: all 0.3s;
}

.switches .pd-checkbox label.inline span:last-child::before,
.switches .pd-checkbox label.inline span:last-child::after {
  content: "";
  position: absolute;
}

.switches .pd-checkbox span:last-child::before {
  left: 1px;
  top: 1px;
  width: 24px;
  height: 24px;
  background: #FFF;
  border-radius: 50%;
  z-index: 1;
  transition: transform 0.3s;
}
/* Style the "X" switch */
.switches .pd-checkbox span:last-child::after {
  top: 50%;
  right: 8px;
  width: 12px;
  height: 12px;
  transform: translateY(-50%);
  background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/162656/uncheck-switcher.svg);
  background-size: 12px 12px;
}
/* Style the "ON" switch */
.switches .pd-checkbox [type="checkbox"]:checked + label span:last-child {
  background: #00d084;
}

.switches .pd-checkbox [type="checkbox"]:checked + label span:last-child::before {
  transform: translateX(24px);
}

.switches .pd-checkbox [type="checkbox"]:checked + label span:last-child::after {
  width: 14px;
  height: 14px;
  /*right: auto;*/
  left: 8px;
  background-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/162656/checkmark-switcher.svg);
  background-size: 14px 14px;
}

#pardot-form .no-label{
  text-align:center;
   margin-top:35px;
}
#pardot-form .no-label a {
 text-decoration:underline;
}
#pardot-form label {
  font-weight:500;
  font-size:15px;
}
.pd-email {
  margin:20px 0;
}
#pardot-form .description {
  text-align:left;
  display:block;
}
#pardot-form li.pd-checkbox {
  background-color:#FFF;
  margin-bottom:5px;
  border:solid 1px #ebebeb;
  padding:0px 20px 20px 20px;
  border-radius:5px;
  -moz-border-radius:5px;
  -webkit-border-radius:5px;
}
#pardot-form .label-wrapper {
  color:#444444;

}
#pardot-form {
  color:#737373;
}
#pardot-form .form-field {
  text-align:left;
}
#pardot-form input.text {
   border:solid 1px #ebebeb;
  padding:10px;
  border-radius:5px;
  -moz-border-radius:5px;
  -webkit-border-radius:5px;
  color:#737373;
}
#pardot-form .no-label {
  text-align:center;
}
#pardot-form .no-label a {
    color:#737373;
}
              
            
!

JS

              
                
              
            
!
999px

Console