Pen Settings



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


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


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.


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.


                <h1>My personal take on how to style half of a character</h1>
 <p>Taken from this post: <a href="" target="_blank">Is it possible to apply CSS to half of a character?</a></p>
<span class="half-character"></span>
<div class="notes">
  <h3>Personal notes:</h3>
    <li>The main reason I did this was to test myself and see if I was able to accomplish styling half of a character while actually providing a meaningful answer to the OP.</li>
    <li>I am aware that this is not an ideal or the most scalable solution and the solutions proposed by the people in the post are far better for "real world" scenarios.</li>
    <li>The CSS code I created is based on the first thoughts that came to my mind and my own personal approach to the problem.</li>
    <li>My solution only works on symmetrical characters, like X, A, O, M. ** It does not work for asymmetrical chracters like B, C, F, K or lower case letters.</li>
    <li><strong>** HOWEVER</strong>, this approach creates very interesting 'shapes' with asymmetrical characters. Try changing the X to a K or to a lower case letter like an <em>h</em> or a <em>p</em> in the CSS :)</li>
<p>Created by <a href="" target="_blank">Ricardo Zea</a></p>
<time datetime="5-16-2014">Created on: April, 2014</time>


                .half-character {
    display: inline-block;
    font: bold 350px/0.8 Arial;
    position: relative;
    &:after {
        content: "X"; //Change character here
        display: inline-block;
        width: 49%;
        overflow: hidden;
        color: #7db9e8;
    &:after {
        position: absolute;
        top: 0;
        left: 49%;
        color: #1e5799;
        transform: rotatey(-180deg);

/*Styling stuff, not needed for demo*/
.notes {
    text-align: left;
h1 {
    text-transform: capitalize;
time {
    font-size: 11px;
    color: rgba(white, 0.2);
.notes {
    width: 80%;
    margin: 50px auto 0;
    padding: 10px 20px;
    background: rgba(black, 0.15);
    font-size: 0.9em;
.new-window {
    position: relative;
    padding-right: 16px;
    &:after {
        content: "";
        display: block;
        width: 14px;
        height: 12px;
        position: absolute;
        top: 10%;
        right: 0;
        background: url( no-repeat;



                //Add a title to the links that open in a new tab/window
$("a[target='_blank']").attr({title:'Opens in a new tab/window'}).addClass('new-window');