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">Basic Content</span>

<br />

<div style="display:inline-block; margin:0px 20px 0px 0px; text-align:left; width:450px;">

<span class="bolet">Basic structure:</span>

&nbsp;

&lt;!DOCTYPE html&gt; 

&nbsp;

&lt;head&gt; 

&nbsp;

&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;

<br />

&lt;title&gt; Page Title &lt;/title&gt;

<br />

&lt;meta name="description" content="Site description for search engines." /&gt;

<br />

&lt;meta name="keywords" content="search, keywords, separated, with, commas" /&gt;

<br />

&lt;meta name="apple-mobile-web-app-capable" content="yes" /&gt;

<br />

&lt;meta name="mobile-web-app-capable" content="yes" /&gt;

<br />

&lt;link rel="shortcut icon" href="16x16.ico" /&gt;

<br />

&lt;link rel="apple-touch-icon-precomposed" href="57x57.png" /&gt;

<br />

&lt;style type="text/css" media="all"&gt;

&nbsp;

&lt;/style&gt;

<br />

&lt;link rel="stylesheet" type="text/css" id="styleid" href="filename.css" media="all" /&gt;

<br />

&lt;script type="text/javascript" src="filename.js"&gt;&lt;/script&gt;

<br />

&lt;/head&gt; &lt;body&gt; 

<br />

Content here... 

<br />

&lt;/body&gt; &lt;/html&gt;

</div>

<div style="display:inline-block; margin:0px 0px 0px 20px; text-align:left; width:400px;">

<!-- This is a comment among HTML. -->

&lt;!-- This is a comment among HTML. --&gt;

<br /><br />

<span class="bolet">Line break:</span>
&nbsp;

&lt;br /&gt; 

<br /><br />

<span class="bolet">Div:</span>
&nbsp;

&lt;div style="css"&gt; content here &lt;/div&gt;

<br /><br />

<span style="font-weight:bold;">bold</span>, <span style="font-style:italic;">italic</span>, <span style="font-style:italic;font-weight:bold;">etc.</span>

&nbsp;

&lt;span class="cssclass"&gt; text here &lt;/span&gt;

<br /><br />

<span class="bolet">Link:</span>
&nbsp;

&lt;a class="cssclass" target="_blank" href="index.html"&gt; Link &lt;/a&gt; &nbsp; (new tab)
<br />
&lt;a class="cssclass" target="_top" href="index.html"&gt; Link &lt;/a&gt; &nbsp; (main frame)

<br /><br />

<span class="bolet">Anchor Link:</span>
&nbsp;
&lt;a href="#idhere"&gt;Jump there&lt;/a&gt;
&nbsp;
&lt;span id="idhere"&gt;Land here&lt;/span&gt;

<br /><br />

<span class="bolet">Image:</span>
&nbsp;

&lt;img class="cssclass" src="filename1.png" alt="Something" title="Something" /&gt; 

</div>

<br /><br />

<div class="left">

<div style="display:inline-block; text-align:center; margin:0px 20px 0px 0px; float:left;">

<a target="targetname" href="https://codepen.io/Mikari/">iFrame</a>

<br />

<iframe class="showbor" style="width:300px; height:100px; margin:0px auto 0px auto;" id="targetname" name="targetname" src="https://codepen.io/Mikari/"></iframe> 

</div>

<span class="bolet">Iframe:</span>
&nbsp;

&lt;iframe class="cssclass" id="targetname" name="targetname" src="file.html"&gt;&lt;/iframe&gt;

<br /><br />

<span class="bolet">Hypertext Access:</span> 
You can make a file on notepad and save it as: &nbsp; .htaccess &nbsp; 
Since .htaccess is the format, it can appear as having no filename.

<br /><br />

<div style="text-align:left; display:inline-block; margin:0px 30px 0px 0px;">

<span class="bolet">Redirecting:</span>
<br />
ErrorDocument 404 http://...
<br />
ErrorDocument 403 http://...

</div>

<div style="text-align:left; display:inline-block;">

<span class="bolet">Changing the index:</span>
<br />
DirectoryIndex mainpage.html
<br />
This will become the default page instead of index.html

</div>

<br /><br />

<div class="showbor" style="align-items:center; display:flex; min-height:100px; height:100px; width:150px; float:left; margin:0px 15px 10px 0px;">

<div class="showbor" style="width:100px; height:50px; margin:0px auto 0px auto;"> </div> </div>

<span class="bolet">Vertical Center Flex:</span> display:flex; align-items:center; height:100%; width:100%; min-height:???px;

<br /><br />

&lt;div class="showbor" style="align-items:center; display:flex; min-height:100px; height:100px; width:150px;"&gt;

&lt;div class="showbor" style="width:100px; height:50px; margin:0px auto 0px auto;"&gt; &lt;/div&gt; &lt;/div&gt;

<br /><br />

<div class="showbor" style="width:300px; height:150px; overflow-x:hidden; overflow-y:scroll; perspective:1px; position:relative; float:right; margin:0px 0px 10px 20px;">

<div style="background-color:#2c87ee; width:300px; height:150px; position:relative; z-index:2; margin-bottom:150px;"></div>

<div style="width:900px; height:450px; background-size:270px auto; background-repeat:repeat-x; background-color:#adffff; position:absolute; left:-300px; top:0px; z-index:1; transform: translateZ(-2px);"></div> 

<div style="background-color:#2c87ee; width:300px; height:150px; position:relative; z-index:2;"></div>

</div><br />

<span class="bolet">Parallax:</span>

The parallax layers need to be the same height to prevent empty scroll space. The container and top layer have position:relative; and the back layer has position:absolute; The perspective:1px; determines the distance between layers, where the surface is 0 and translateZ(-1px); is twice as far, translateZ(-2px); is 3 times as far, etc. perspective:10px; translateZ(-5px); is half the distance of perspective:1px; translateZ(-1px); If a layer is twice as far from the screen surface, it would need to be twice the size to match the top layer, likewise, if it's 3 times as far, it needs to be 3 times the size, with the left position corrected accordingly.

<br /><br />

&lt;div class="showbor" style="width:300px; height:150px; overflow-x:hidden; overflow-y:scroll; perspective:1px; position:relative; float:right; margin:0px 0px 10px 15px;"&gt;

&lt;div style="width:300px; height:150px; background-image:url(design/skyblueline.png); position:relative; z-index:2; margin-bottom:150px;"&gt;&lt;/div&gt;

&lt;div style="width:900px; height:450px; background-image:url(design/blueback.png); background-size:270px auto; background-repeat:repeat-x; background-color:#adffff; position:absolute; left:-300px; top:0px; z-index:1; transform: translateZ(-2px);"&gt;&lt;/div&gt; 

&lt;div style="width:300px; height:150px; background-image:url(design/skyblueline.png); position:relative; z-index:2;"&gt;&lt;/div&gt;

&lt;/div&gt;

</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>
            
          
!
            
              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 { color:#ff71ce; text-decoration:none; }
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console