Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <h1>My homepage with cookies</h1>

<p>This is the default iubenda Cookie Solution banner. Remember to use your own credentials <a href="https://www.iubenda.com/en/dashboard">from your iubenda account</a>.</p>

<p><a href="https://www.iubenda.com/en/help/1205">Read this guide</a> for more information about setup and customization of our Cookie Solution banner.</p>

<style type="text/css">
body {
    background-color: #eee;
}

a { 
  color: green;
}

h1 {
    margin-top: 100px;
}

/* cookie banner related styles below */

/***************************************************************************
// * Iubenda Cookie Solution                                               *
// *                                                                       *
// * (c) 2015 Iubenda srl <info@iubenda.com>                               *
// * All Rights Reserved.                                                  *
// *                                                                       *
// *************************************************************************
//
// CHANGELOG
// 0.0.1
// - first implementation of customizable css
*/

/*  GENERAL CLASS */
#iubenda-cs-banner{
    /* IMPORTANT NOTICE: 
    don't change these values as they may prevent the banner from properly showing. Some     of these lines, moreover (like z-index) will overwrite the configuration initialized by the script you paste in your pages. To show the banner at the bottom you can switch to "bottom: 0px !important;". Don't forget to put "slideDown" to "false".
     */
    bottom: 0px !important;
    left: 0px !important;
    position: fixed !important;
    width: 100% !important;
    z-index: 99999998 !important;
    background-color: black;
    /* ----------------- */
}

/*  CONTENT CLASS */
.iubenda-cs-content{
    display:block;
    margin:0 auto;
    padding: 20px;
    width:auto;
    font-family: Helvetica,Arial,FreeSans,sans-serif;
    font-size: 14px;
    background: #4679BD;
    color: #fff;
}
.iubenda-banner-content{

}

.iubenda-cs-rationale{
    max-width: 900px; position:relative; margin: 0 auto;
}

/*   STYLE FOR TEXT INTERNAL BANNER */
.iubenda-banner-content > p {
    font-family: Helvetica,Arial,FreeSans,sans-serif;
    line-height: 1.5;
}

/*  CLOSE BUTTON. NOTICE: IMAGE FOR BUTTON NOT IMPLEMENTED YET */
.iubenda-cs-close-btn{
    margin:0;
    color: #fff;
    text-decoration:none;
    font-size:14px;
    position: absolute;
    top: 0;
    right: 0;
    border: none;
}

/*  STYLE FOR TEXT LINK TO PRIVACY POLICY */
.iubenda-cs-cookie-policy-lnk{
    text-decoration: underline;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
}
</style>

<script type="text/javascript">
        // <![CDATA[
        var _iub = _iub || [];
        _iub.csConfiguration = {
            siteId: 896537, //use your siteId
            cookiePolicyId: 8207462, //use your cookiePolicyId
            banner: {
                slideDown: false,
                applyStyles: false,
                content: "<p>Notice</p>" +
    	        "<p>You can completely change the text via simple settings changes in the javascript and rename the %{cookie_policy_link}.<br />Closing this will assume you agree with our use of cookies.</p>",
    	        cookiePolicyLinkCaption: "cookie policy link name",
                backgroundColor: "green",
                innerHtmlCloseBtn: "OK"
            }
        };
        (function(w, d) {
            var loader = function() {
                var s = d.createElement("script"),
                    tag = d.getElementsByTagName("script")[0];
                s.src = "//cdn.iubenda.com/cookie_solution/iubenda_cs.js";
                tag.parentNode.insertBefore(s, tag);
            };
            if (w.addEventListener) {
                w.addEventListener("load", loader, false);
            } else if (w.attachEvent) {
                w.attachEvent("onload", loader);
            } else {
                w.onload = loader;
            }
        })(window, document);
        // ]]>
</script>
              
            
!

CSS

              
                
              
            
!

JS

              
                //don't copy this js (just for demo purposes)

_iub.csConfiguration.skipSaveConsent = true; //don't save consent, always show the banner
              
            
!
999px

Console