HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
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.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
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.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
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.
Using packages here is powered by Skypack, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ES6 import
usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<div class="container">
<section class="tabContainer">
<input checked type="radio" name="tab" id="tab-A">
<input type="radio" name="tab" id="tab-B">
<label class="tab-link" for="tab-A"><span>Wash Packages</span></label>
<label class="tab-link" for="tab-B"><span>Other Services</span></label>
<article class="tab-content">
<div class="table">
<div class="table-columns">
<ul class="column">
<li><i class="fa fa-car icon"></i></li>
<li><span>Hand wash using spot free water</span></li>
<li><span>Wheels, tires and wheel wells thoroughly cleaned</span></li>
<li><span>Interior thoroughly vacuumed</span></li>
<li><span>Dash and consoles wiped down</span></li>
<li><span>Windows cleaned inside and out</span></li>
<li><span>Door jams cleaned</span></li>
<li><span>Tires dressed</span></li>
<li><span>Apply high end professional wax to paint</span></li>
<li><span>Remove all contaminates from paint using a clay bar</span></li>
<li><span>Pre-Polish hand wash (post clay wash)</span></li>
<li><span>Single stage polish to remove fine scratches and imperfections</span></li>
<li><span>All rubber and plastic trim and molding treated</span></li>
<li><span>Engine compartment throughly cleaned</span></li>
<li><span>Every panel, vent, and console thoroughly cleaned</span></li>
<li><span>All carpet, and upholsrty shampooed and hot water extracted</span></li>
<li><span>Leather thoroughly cleaned and treated (if applicable)</span></li>
<li><span>Most Cars</span></li>
<li><span>Most Trucks & SUV’s</span></li>
</ul>
</div>
<div class="table-columns column-count-3">
<ul class="column">
<li>Maintenance Wash</li>
<li><span><i class="fa fa-circle"></i></span></li>
<li><span><i class="fa fa-circle"></i></span></li>
<li><span><i class="fa fa-circle"></i></span></li>
<li><span><i class="fa fa-circle"></i></span></li>
<li><span><i class="fa fa-circle"></i></span></li>
<li><span><i class="fa fa-circle"></i></span></li>
<li><span><i class="fa fa-circle"></i></span></li>
<li><span> </span></li>
<li><span> </span></li>
<li><span> </span></li>
<li><span> </span></li>
<li><span> </span></li>
<li><span> </span></li>
<li><span> </span></li>
<li><span> </span></li>
<li><span> </span></li>
<li><span>$35</span></li>
<li><span>$45</span></li>
</ul>
<ul class="column">
<li>Wash & Wax</li>
<li><span><i class="fa fa-circle"></i></span></li>
<li><span><i class="fa fa-circle"></i></span></li>
<li><span><i class="fa fa-circle"></i></span></li>
<li><span><i class="fa fa-circle"></i></span></li>
<li><span><i class="fa fa-circle"></i></span></li>
<li><span><i class="fa fa-circle"></i></span></li>
<li><span><i class="fa fa-circle"></i></span></li>
<li><span><i class="fa fa-circle"></i></span></li>
<li><span> </span></li>
<li><span> </span></li>
<li><span> </span></li>
<li><span> </span></li>
<li><span> </span></li>
<li><span> </span></li>
<li><span> </span></li>
<li><span> </span></li>
<li><span>$85</span></li>
<li><span>$100</span></li>
</ul>
<ul class="column">
<li>Complete Detail</li>
<li><span><i class="fa fa-circle"></i></span></li>
<li><span><i class="fa fa-circle"></i></span></li>
<li><span><i class="fa fa-circle"></i></span></li>
<li><span><i class="fa fa-circle"></i></span></li>
<li><span><i class="fa fa-circle"></i></span></li>
<li><span><i class="fa fa-circle"></i></span></li>
<li><span><i class="fa fa-circle"></i></span></li>
<li><span><i class="fa fa-circle"></i></span></li>
<li><span><i class="fa fa-circle"></i></span></li>
<li><span><i class="fa fa-circle"></i></span></li>
<li><span><i class="fa fa-circle"></i></span></li>
<li><span><i class="fa fa-circle"></i></span></li>
<li><span><i class="fa fa-circle"></i></span></li>
<li><span><i class="fa fa-circle"></i></span></li>
<li><span><i class="fa fa-circle"></i></span></li>
<li><span><i class="fa fa-circle"></i></span></li>
<li><span>$225</span></li>
<li><span>$300</span></li>
</ul>
</div><!-- /table-columns -->
</div><!-- /tableContainer -->
</article>
<article class="tab-content">
<div class="card-columns">
<div class="column">
<span class="icon-wrap txt--center">
<i class="icon fa fa-eyedropper"></i>
</span>
<h3 class="title">Sealants</h3>
<span class="divider"> </span>
<p class="summary">
It is highly recommended that all surfaces inside and out on your vehicle have a sealant applied every year. This will preserve the color and integrity of both the paint and interior. The sealant application process for paint is similar to the clay and wax procedure, the difference is the product that is used. Sealant is formulated to bond to the paint surface a lot better than regular wax. It basically forms a shield over your paint that protects it from the elements. It is also important to protect the interior with sealant so that those accidents that are sometimes unavoidable. don’t stain permanently.
</p>
<span class="price">Call or email for quote</span>
</div>
<div class="column">
<span class="icon-wrap txt--center">
<i class="icon fa fa-eyedropper"></i>
</span>
<h3 class="title">Headlight Restoration</h3>
<span class="divider"> </span>
<p class="summary">Over time, the protective film that comes on your headlights when they are starts to deteriorate. You will notice that the lenses start to look faded, foggy, and yellow. This actually makes the headlights project less light when in use. This can be a hazard as well as it makes your vehicle appear years older than it should. This damage can be prevented as well as repaired. When a vehicle is new, before the deterioration even starts, it is recommended that your headlights treated with our protective coating. This will keep the headlights from becoming exposed to the damaging elements and if kept up, will never become yellow and foggy. If the damage is done we can restore your headlights to like new condition in most cases. Once restored, we will apply the protective coating to the lenses as to protect against future damage.</p>
<span class="price">Most vehicles $100.00</span>
</div>
<div class="column">
<div class="img-wrap shadow-inset">
<img class="img" src="http://cdn.llumar.com/drupal/styles/copytext_center/azure/formulaone.jpg?itok=TYHntUCp" alt="Clear Bra Paint Protection" />
</div>
<h3 class="title">Clear Bra Paint Protection</h3>
<span class="divider"> </span>
<p class="summary">Clear Bra Paint protection film is one of the best investments you could make when it comes to preserving the original condition of your vehicle. As we all know, the likelihood of road debris kicking up and causing damage to the front end of a vehicle is high every time you drive. All it takes is getting behind the wrong vehicle one time and you are faced with repainting the front bumper, hood or mirrors. This is very costly but the worst part about it is that now you have aftermarket paint that likely doesn’t match exactly or isn’t the same quality as the factory paint. This product is a thick, perfectly clear vinyl film that is cut to the dimensions and contours of the front of your vehicle. It is custom cut and applied for each vehicle to ensure proper fitment.</p>
<span class="price">Call or email for quote</span>
</div>
<div class="column">
<span class="icon-wrap txt--center">
<i class="icon fa fa-eyedropper"></i>
</span>
<h3 class="title">Window Tint</h3>
<span class="divider"> </span>
<p class="summary">Not only does window tint drastically improve the appearance of any vehicle, it also keeps the interior protected from harmful UV rays that will, over time, fade and deteriorate the interior surfaces in your vehicle. Window tint keeps the temperature inside your vehicle drastically lower on those hot summer days as well. We use only the best film in the industry. For newer vehicles that have navigation antennas in the glass, we have the correct film that needs to be used so that the signal will not be affected.</p>
<span class="price">Call or email for quote</span>
</div>
</div><!-- /card-columns -->
</article>
</section>
</div>
@import compass
@import url(//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css)
@import 'https://fonts.googleapis.com/css?family=Roboto|PT+Sans|Old+Standard+TT|Raleway'
// Color Scheme
// ==========================================================================
$black : #000000
$white : #FFFFFF
$ghost-white : #E0E1DD
$off-White : #F1F1F1
$teal-green : #1ABC9C
$teal-blue : #2EB0EE
$color-primary : #F9F9F9
$color-secondary : darken($color-primary, 5%)
$color-text-primary : #666666
$color-text-secondary : lighten($color-text-primary, 5%)
$color-border-primary : $teal-blue
$color-border-secondary : #9EA3BD
$color-border-alpha : $white
$color-border-omega : #E0E0E0
$fontDefault : 1.6
// Font Weights
// ==========================================================================
$font-weight-thin : 100
$font-weight-light : 300
$font-weight-normal : 400
// Media Break Points:
// ==========================================================================
$mobile-sm : '(max-width: 240px)'
$mobile-lg : '(max-width: 320px)'
$tablet-sm : '(max-width: 480px)'
$tablet-lg : '(max-width: 768px)'
$screen-sm : '(max-width: 992px)'
$screen-lg : '(max-width: 1024px)'
$screen-xl : '(max-width: 1200px)'
// Helpers
%pseudos
content: ''
display: block
position: absolute
%clearfix
*zoom: 1
&:before,
&:after
content: ''
display: table
&:after
clear: both
=prefixer($property, $value, $prefixes: webkit moz ms o)
@each $prefix in $prefixes
#{'-' + $prefix + '-' + $property}: $value
#{$property}: $value
=box-shadow($props)
+prefixer(box-shadow, $props)
// Mixin - Creates Triangles
=triangle($direction, $size, $color)
@if $direction == 'up'
border-right: $size solid transparent
border-bottom: $size solid $color
border-left: $size solid transparent
@else if $direction == 'down'
border-top: $size solid $color
border-right: $size solid transparent
border-left: $size solid transparent
@else if $direction == 'left'
border-top: $size solid transparent
border-right: $size solid $color
border-bottom: $size solid transparent
@else if $direction == 'right'
border-top: $size solid transparent
border-bottom: $size solid transparent
border-left: $size solid $color
// Mixin - Creates Grids
=size($w, $h)
width: $w
height: $h
=prefixer($property, $value, $prefixes: webkit moz ms o)
@each $prefix in $prefixes
#{'-' + $prefix + '-' + $property}: $value
#{$property}: $value
=radius($size)
+prefixer(border-radius, $size)
=circle($size)
+radius($size / 2)
=grid-factory($col-per-row, $margin)
width: ((100% - (($col-per-row - 1) * $margin)) / $col-per-row)
&:nth-child(n)
margin-right: $margin
margin-bottom: $margin
&:nth-child(#{$col-per-row}n)
margin-right: 0
margin-bottom: 0
// Mixin - Creates Break Points
=respond-to($media)
@media #{$media}
@content
// Base:
// ==========================================================================
html, body
font-size: $fontDefault
.txt--center
text-align: center
.txt--left
text-align: left
.txt--right
text-align: right
.txt--justify
text-align: justify
.icon
font-size: 2.5em
color: darken($color-secondary, 10%)
.container
width: 100%
max-width: 960px
margin: 20px auto
position: relative
.row
width: 100%
.divider,
.divider--lg
@extend %clearfix
width: 15%
height: 1px
background-color: $color-border-omega
display: block
margin: 20px auto
&--lg
width: 75%
.img-wrap
width: 136px
height: 136px
+circle(136px)
position: relative
margin: 0 auto 30px
overflow: hidden
border: 3px solid $white
background-clip: padding-box
&:after
@extend %pseudos
width: 100%
height: 1px
top: 0
z-index: -1
background: lighten($black, 80%)
/* &:before
+size(136px, 136px)
+circle(136px)
content: ''
position: absolute
top: 0
left: 0
display: block
box-shadow: inset 0 0 0 5px rgba(255,255,255,0.6), 0 1px 2px rgba(0,0,0,0.1)
z-index: 1000*/
.img
max-width: 100%
height: auto
display: inline-block
margin-left: auto
margin-right: auto
margin-top: 20px
transform: scale(3)
.link--more
display: inline-block
color: $teal-blue
position: relative
&:hover
cursor: pointer
.link--more:hover + .tooltip
display: block
opacity: 1
.tabContainer
width: 100%
// Tabs
input
display: none
.tab-link
+grid-factory(2, 0%)
position: relative
font: normal 1.125em/3em 'Roboto'
cursor: pointer
color: $color-text-primary
font-weight: bold
text-decoration: none
display: block
float: left
text-align: center
background: $color-secondary
border-top: 7px solid $color-border-secondary
border-bottom: 1px solid $color-border-alpha
&:hover
background: darken($color-primary, 5%)
&:after
@extend %pseudos
width: 100%
height: 1px
background: $color-border-omega
bottom: 0
// Create Tab Link Vertical Dividers
.tab-link > span
height: 100%
display: block
.tab-link:nth-of-type(2) > span
border-left: solid 1px $color-border-alpha
.tab-link:nth-of-type(1) > span
border-right: solid 1px $color-border-omega
.tab-content
height: auto
clear: both
background: $color-primary
display: none
// Begin Functionality:
// ==========================================================================
// Active State Borders - Horizontal
#tab-B:checked ~ .tab-link:nth-of-type(2),
#tab-B:not(:checked) ~ .tab-link:nth-of-type(1)
background: $color-primary
border-top-color: $color-border-primary
border-bottom-color: $color-primary
// Active State Borders - Vertical
#tab-B:not(:checked) ~ .tab-link:nth-of-type(2) > span
border-left: solid 1px $color-border-omega
#tab-B:not(:checked) ~ .tab-link:nth-of-type(1) > span
border-right: solid 1px $color-border-alpha
// Active State Down Arrow
#tab-B:checked ~ .tab-link:nth-of-type(2):before,
#tab-B:not(:checked) ~ .tab-link:nth-of-type(1):before
+triangle(down, 6px, $teal-blue)
@extend %pseudos
top: 0
left: 50%
// Hide Accent Border
#tab-B:checked ~ .tab-link:nth-of-type(2):after,
#tab-B:not(:checked) ~ .tab-link:nth-of-type(1):after
display: none
// Display Active Tab Content
.tabContainer input:nth-of-type(2):not(:checked) ~ .tab-content:nth-of-type(1),
.tabContainer input:nth-of-type(2):checked ~ .tab-content:nth-of-type(2)
display: block
// Begin Table Styles
// ==========================================================================
.table
width: 100%
background: $color-primary
overflow: hidden
.table-columns
+grid-factory(2, 0)
float: left
&.column-count-3 > .column
+grid-factory(3, 0)
float: left
text-align: center
.table-columns .column li:nth-of-type(even)
background: $white
.column li
padding-left: 30px
font: normal 0.875em/3.5em 'PT Sans'
color: $color-text-secondary
background: $color-primary
border-top: solid 1px $color-border-omega
span
width: 100%
height: 100%
position: relative
display: block
border-top: 1px solid $white
+respond-to($tablet-lg)
line-height: 1.2em
padding: 5px
text-align: center
.column-count-3 .column li
padding-left: 0
span
border-left: 1px solid $color-border-omega
border-top: 1px solid $white
.fa-circle
color: $teal-blue
.column li:first-child
font: normal 0.875em/5em 'Roboto'
text-align: center
padding: 0
border-top: 0
border-right: 0
+respond-to($tablet-lg)
height: 5em
line-height: 1.2em
padding: 5px
.column li:nth-last-child(2),
.column li:last-child
font: 300 1.125em/3em 'Roboto'
color: $color-text-primary
text-align: center
background: $white
// Other Services
.lead
font: normal 1.125em/1.125em 'PT Sans'
color: $color-text-secondary
text-align: center
padding: 2em 0
.card-columns
@extend %clearfix
width: 100%
padding-top: 30px
background: $color-primary
.card-columns > .column
+grid-factory(1, 2%)
float: left
text-align: center
position: relative
margin-bottom: 60px !important
&:nth-of-type(1)
margin-top: 60px
.icon-wrap
display: block
padding-bottom: 18px
.title
font: normal 1.125em/1em 'Roboto'
.summary
font: normal 0.875em/1.5em 'PT Sans'
color: $color-text-secondary
padding: 0 12%
.price
font: 400 1.125em/3em 'Roboto'
display: block
Also see: Tab Triggers