css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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. 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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <!DOCTYPE html>
    <html>
        <head>
            <title> Chillblast </title>
            <link rel="stylesheet" type="text/css" href="style.css" />
        </head>

        <body>
            <div id="container">
                    <div id="header">
                                                    <!-- <img src="img.jpg" width="800" height="200" alt="logo" /> setting 
                                                                image as header -->
                    <h1> <u>Lorem Ipsum</u></h1>
                    <script type="text/javascript"> 
                    var myvar = "Welcome";
                    alert(myvar);
                    </script>
                    </div> 

                <div id="content">
                    <div id="navi">
                        <h3> <u>Navigation</u></h3>
                        <ul>
                            <li><a class="selected" href="index.html">Home</a></li> <!-- creating a css class   
                                                                    called selected as this is
                                                                     the page we are on -->
                            <li><a href="form.html"> Quote me</a></li>
                            <li><a href="index.html"> Gallery</a></li>
                            <li><a href="index.html">Contact us</a></li>
                    </div>

                    <div id="main">
                        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec condimentum urna nec nibh varius aliquam.<br>
                        Pellentesque sit amet justo lectus. Sed vehicula purus in porta fermentum. Integer malesuada non augue id sollicitudin.<br>
                        Curabitur non purus elementum, porttitor nisl nec, vestibulum mauris. Ut euismod urna tortor.<br>
                        Curabitur consequat mi eu sapien laoreet, vitae pharetra magna porttitor. Cum sociis natoque penatibus et<br>
                        magnis dis parturient montes, nascetur ridiculus mus. Aliquam et placerat massa. Fusce felis tellus, <br>
                        gravida at convallis vitae, vestibulum eu sapien. Suspendisse sed sapien egestas, scelerisque risus ut,<br>
                        molestie dui. Etiam lacinia tellus a aliquet faucibus. </p>
                    </div>
                </div>      
                <div id="footer">
                Footer Copyright &copy; Andrew doyle
                </div>
            </div>
        </body>
    </html>
            
          
!
            
                 body{
                          /* dont need to call id*/
        background-color:black;
        background-repeat: no-repeat;
        font-family: lobster, baskerville, sans-serif, arial;     /* set the font for the whole body,
                                                       use back up fonts too*/
    }

    a{                                                  /*In the same way we targeted the body tag we can target the a tag*/
        text-decoration: none;                          /* links not underlined*/
            color: white;                                   /* links are coloured red*/


    }

    p{

        color:#FFFFFF;
    }

    #container{

        height: 100%;
        width: 100%;
        margin: 0 auto;
        background-image:url("spc.png"); 


    }

    h1{ /* using commas i could set it for h1,h2,h3*/
        margin:0; /* gets rid of margin*/
    }

    #header {
        width:100%;
        height:10%;
        background:transparent;                              /* background of div id set to blue */                                 /* text set to red*/
        text-align: center;                                 /* aligns text in the header to middle of page*/
        padding: 20px;
        color: white;
    }

                                                            /* #content{ padding-left:10px and all seperate directions or can use 
                                                                padding: 10px 10px 10px 10px
                                                                1st is top 2nd is right 3rd is bottom and 4th is the left and since want 
                                                                all the same we can shorten even more and just put 10px*/

    #content {

        width: 100%;
        height: 90%;
        margin: 0 auto;
    }





    #navi{
        display: inline-block;
        height:70%;
        text-align: center;                                      /*as divs always start a new line to stop this we use float*/
        background: transparent;
        color: white;
        margin: 0 auto;

    }
    #navi ul{

        list-style-type: none;                              /* gets rid of the bullet points after targeting ul*/
                                                /*gets rid of padding */

    }




    }
    #main{ 

        display: inline-block;
        width: 80%;
        height:70%;
        background:transparent;
        margin: 0 auto; 

    }



    #main p{


    color: white; 
    }




    #footer{
        display: block;
        height: 20%;
        width: 100%;                                        /* this is to clear of all floating elements or will not appear
                                                            below, clearing both lets the div element get past all 
                                                            the floating div elements*/ 
        padding: 0px;
        background: transparent;
        color: white;
        text-align: right;
    }
#navi li {
    display:inline-block;
}
#main {display:inline-block; width:500px;}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console