Pen Settings

HTML

CSS

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

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

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.

HTML

              
                <!DOCTYPE HTML>
<html>
    <head>
        <!--meta tags-->
        <meta charset="utf-8">
        <meta name="viewport" content="width-device-width"> <!--sets the width of the page to follow the screen width of the device-->
        <!--SEO (revise later)-->
        <meta name="description" content="beautiful facilities, and high-quality service">
        <meta name="keywords" content="tearoom, craftshop, general village store and post office, bed and breakfast">
        <meta name="author" content="William Hammond">
        
        <title>Chollerton Tearooms | Welcome</title>
        <link rel="stylesheet" href="style.css">
    </head>
    <body>
        <!--HEADER-->
        <header>
            <div class="wrapper">
                <div id="logo">
                    <h1><span class="highlight">Chollerton</span>Tearooms</h1>
                </div>
                <nav>
                    <ul>
                        <li class="current"><a href="index.html">Home</a></li>
                        <li><a href="#">Find Out More</a></li>
                        <li><a href="#">Admin</a></li>
                        <li><a href="#">Credits</a></li>
                        <li><a href="#">Wireframe</a></li>
                    </ul>
                </nav>
            </div>
        </header>
        <!--SECTIONS-->
        <section id="banner">
            <div class="wrapper">
                <h1>Beautiful facilities, and high-quality service</h1>
                <p>Welcome to Chollerton Tearooms, where the grass is green and so is the tea! (Don't worry, it doesn't have to be...)</p>
            </div>
        </section>
        
        <section id="newsletter">
            <div class="wrapper">
                <h1><span class="highlight">Subscribe</span> to our newsletter</h1>
                <form>
                    <input type="email" placeholder="Enter email:">
                    <button type="submit" class="newsletter_button">Subscribe</button>
                </form>
            </div>
        </section>
        <!--MAIN-->
        <main id="boxes">
            <!--IMAGE ROW 1-->
            <div class="wrapper">
                <div class="box">
                    <img class="images" src="images/teaBox.jpg">
                    <h3>Tearoom</h3>
                    <p>
                        Sit back, and relax in our sumptuous, traditional tearoom, where you can enjoy any one of our delicious homemade deserts, with a warm mug of classic British tea.
                    </p>
                </div>
                <div class="box">
                    <img src="images/craftshopBox.jpg">
                    <h3>Craftshop</h3>
                    <p>
                        We're much more than just a Tearoom. If you're itching to get creative, we offer a wide range of craft supplies that can be bought from our very own craft shop.
                    </p>
                </div>
                <div class="box">
                    <img src="images/villageBox.JPG">
                    <h3>General Village Store</h3>
                    <p>
                        The general store available here at Chollerton Tearooms can provide you with all the basic groceries you'll find at any major supermarket, only much more fresh.
                    </p>
                </div>
            </div>
            
            <!--IMAGE ROW 2-->
            <div class="wrapper">
                <div class="box">
                    <img class="images" src="images/postOfficeBox.jpg">
                    <h3>Post Office</h3>
                    <p>
                        We offer a fantastic postal service here at Chollerton Tearooms. Being the main post office in Chollerton for over a decade, we have plenty of experience.
                </div>
                <div class="box">
                    <img src="images/bandbBox.jpg">
                    <h3>Bed & Breakfast</h3>
                    <p>
                        Our Bed & Breakfast is held in very high regard. If you're looking to enjoy a romantic weekend in the countryside, or enjoy the local hike paths, there's no place better.
                    </p>
                </div>
            </div>
        </main>
        
        <footer>
            <p>Chollerton Tearooms, Copyright &copy; 2018</p>
        </footer>
    </body>
</html>
              
            
!

CSS

              
                body{
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    padding:0;
    margin:0;
    background-color: #41B3A3;
}

/*Classes*/

.wrapper{
    width:85%;
    margin:auto;
    overflow: hidden; /*hides scroll bars*/
}
ul{
    margin:0;
    padding:0;
}
.newsletter_button{
    height:38px;
    background: #41B3A3;
    border:0;
    padding-left: 20px;
    padding-right: 20px;
    color: #fff;
}
header{
    background: #E8A87C;
    color: #fff;
    padding-top: 30px;
    min-height: 70px;
    border-bottom: #E27D60 3px solid;
}
header a{
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 15px;
}
header li{
    float: left;
    display: inline;
    padding: 0 20px 0 0; 
}
header #logo{
    float: left;
}
header #logo h1{
    margin: 0;
}
header nav{
    float: right;
    margin-top: 11px;
}
.highlight, .current a{
    color: #41B3A3;
    font-weight: bold;
}
header a:hover{
    color: #C38D9E;
    font-weight: bold;
}

#banner{
    min-height: 400px;
    background:url('images/teaShowcase2.jpeg') no-repeat 0 -300px;
    text-align: center;
    color: #fff;
}
#banner h1{
    margin-top: 50px;
    margin-bottom: 10px;
    font-size: 55px;
}
#banner p{
    font-size: 20px;
}

#newsletter{
    padding:15px;
    color: #fff;
    background: #E8A87C;
}
#newsletter h1{
    float: left;
}
#newsletter form{
    float: right;
    margin-top: 15px;
}
#newsletter input[type="email"]{
    padding:4px;
    height: 25px;
    width:250px;
}
#boxes{
    margin-top:20px;
}
#boxes .box{
    float: left;
    text-align: center;
    width: 30%;
    padding: 10px;
    color: #fff;
}
#boxes .box img{
    width: 250px;
    height: 180px;
    border-radius: 8px;
    border: 3px solid #fff;
}
footer{
    padding: 20px;
    margin-top: 20px;
    color: #fff;
    background-color: #E8A87C;
    text-align: center;
}

/*media querie - for phone/tablet*/

@media(max-width: 768px){
    header #logo,
    header nav,
    header nav li,
    #newsletter h1,
    #newsletter form,
    #boxes .box
    {
        float:none;
        text-align: center;
        width:100%;
    }
    header{
        padding-bottom: 20px;
    }
    #banner h1{
        margin-top:40px;
    }
    #newsletter button{
        display:block;
        width: 100%;
    }
    #newsletter form input[type="email"]{
        width: 100%;
        margin-bottom:5px;
    }
}
              
            
!

JS

              
                
              
            
!
999px

Console