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>
        <link type="text/css" rel="stylesheet" href="fcc-landing-page-style.css">
        <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.1/css/all.css" integrity="sha384-5sAR7xN1Nv6T6+dT2mhtzEpVJvfS3NScPQTrOxhwjIuvcA67KV2R5Jz6kr4abQsz" crossorigin="anonymous">
        <link href="https://fonts.googleapis.com/css?family=Lato|Open+Sans" rel="stylesheet">
        <title>HugBox Landing Page</title>
    </head>
    <body>
        <header id="header">
            <div id="top-nav">
                <a href="#" ><img id="header-img" src="http://www.gracewitter.com/wp-content/uploads/2018/10/HugBox-logo-yellow-1.png" alt="hug box logo"></a>
                <nav id="nav-bar">
                    <a href="#" id="menu-icon"><i class="fas fa-bars"></i></a>
                    <ul>
                        <li><a href="#whatIsHugBox" class="current nav-link">What&rsquo;s HugBox?</a></li>
                        <li><a href="#products" class="nav-link">Products</a></li>
                        <li><a href="#contact" class="nav-link">Contact</a></li>
                    </ul>
                </nav>
            </div>
            <div id="hero-section">
                <div id="hero-text-container">
                    <h1>The warmth of a hug.</h1>
                    <h1>Delivered to your door.</h1>
                    <p>HugBox is the loving hug you send your friend (or yourself!) when they&rsquo;re having a tough time <strong>for as little as £15* per month</strong>.</p>
                    <form id="form" action="https://www.freecodecamp.com/email-submit">
                        <input type="email" name="email" id="email" placeholder="Enter your email" required>
                        <input type="submit" id="submit" value="Get Early Access + 10% Off" class="button">
                    </form>
                </div>
                <div id="hero-image-container">
                    <div id="hero-image-1"></div>
                    <div id="hero-image-2"></div>
                </div>
            </div>
        </header>
        <section id="whatIsHugBox">
            <h2><span id="header-underline">What is HugBox?</span></h2>
            <div class="grid">
                <div class="-grid-item">
                    <div class="whatIsHugBox-grid-item-img"></div>
                    <div class="whatIsHugBox-grid-item-text">
                        <i class="fas fa-star grid-icon"></i>
                        <h3>Quality Products</h3>
                        <p>Each HugBox is packed with 5 items designed to to make you feel good.</p>
                    </div>
                </div>
                <div class="grid-item">
                    <div class="whatIsHugBox-grid-item-img"></div>
                    <div class="whatIsHugBox-grid-item-text">
                        <i class="fas fa-smile-beam grid-icon"></i>
                        <h3>Spread Cheer and Love</h3>
                        <p>Getting a HugBox reminds you that you matter and that someone cares.</p>
                        
                    </div>
                </div>
                <div class="grid-item">
                    <div class="whatIsHugBox-grid-item-img"></div>
                    <div class="whatIsHugBox-grid-item-text">
                        <i class="fas fa-users grid-icon"></i>
                        <h3>For Everyone</h3>
                        <p>Each HugBox is created for <em>anyone</em> who could use a boost, pick-me up, or some self-care. </p>
                    </div>
                </div>
            </div>
            
        </section>
        <section id="products">
            <h2><span id="header-underline">What&rsquo;s Included?</span></h2>
            <p><em>The contents of each HugBox changes every month to keep things fresh and exciting. Every item is selected to make you feel good, de-stress, find calm, and feel pampered. Here are some items we packed in previous boxes.</em></p>
            <div class="grid">
                <div class="grid-item">
                    <div ><img class="grid-item-img" src="https://www.blurtitout.org/wp-content/uploads/2017/12/BuddyBox-HB-Dec17-19-768x768.jpg" alt="photo of the self care project book"></div>
                    <div class="grid-item-text">
                        <h3>Books and Cards</h3>
                        <p>Everything you need to know about how to take care of yourself and actually follow through in your daily life.</p>
                    </div>
                </div>
                <div class="grid-item">
                    <div ><img class="grid-item-img" src="https://www.blurtitout.org/wp-content/uploads/2018/07/BuddyBox-HB-July18-15-768x768.jpg" alt="self care koala bear enamel pin"></div>
                    <div class="grid-item-text">
                        <h3>Encouraging Pins</h3>
                        <p>Pin a little reminder to take care of yourself close to your heart.</p>
                    </div>
                </div>
                <div class="grid-item">
                    <div ><img class="grid-item-img" src="https://ii.worldmarket.com/fcgi-bin/iipsrv.fcgi?FIF=/images/worldmarket/source/74361_XXX_v1.tif&wid=650&cvt=jpeg" alt="oh k korean beauty under eye mask"></div>
                    <div class="grid-item-text">
                        <h3>Pampering Products</h3>
                        <p>For those times you need stay home, wrap up in a fuzzy bath robe, and take care of yourself.</p>
                    </div>
                </div>
            </div>
        </section>
        <footer id="contact">
            <h1>Want some freebies?</h1>
            <h3>Sign up for our newsletter!</h3>
            <form id="footer-form" action="https://www.freecodecamp.com/email-submit">
                <input type="email" id="footer-email" name="email" placeholder="Enter your email" required>
                <button type="submit" id="footer-button">Yes, I like free things</button>
            </form>
        </footer>
    </body>
</html>
            
          
!
            
              body{
    color: #555;
    line-height: 1.25em;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}
h1,h2,h3{
    font-family: 'Lato', sans-serif;
}
p{
    font-family: 'Open Sans', sans-serif;
	line-height: 1.65em;
}
/* Header Styles */
header{
    width: 100%;
    display: flex;
    flex-direction: column;
    background-color: #FFD80F;
    top: 0;
    left: 0;
}
#top-nav{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #FFFFFB;
    height: 100px;
    position: fixed;
    width: 100%;
    background-color: #FFD80F;
    z-index: 100;
}
#header-img{
    padding: 12px 0 12px 20px;
    width: 150px;
    height:auto;
    } 
}
nav ul{
    margin: 0;
    padding: 0;
}
nav li{
    display: inline-block;
    list-style: none;
}
nav a {
    font-family: 'Lato', sans-serif;
    color: #FFFFFB;
    letter-spacing: 1.5px;
    text-decoration: none;
    display: block;
    padding: 30px 12px;
}
nav a:hover{
    font-weight: bolder;
    border-bottom: 2px #01B2DE dashed;
    padding-bottom: 5px;
}
#menu-icon{
    width: 100%;
    padding: 10px 12px;
    text-align: right;
    box-sizing: border-box;
    font-size: 40px;
    display: none;
    cursor: pointer;
}
/* Hero Section, text and images */
#hero-section{
    display: flex;
    margin: 50px 100px;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap-reverse;
    position: relative;
    margin-top: 150px;
}
#hero-text-container{
    height: auto;
    width: 400px;
    background-color: #FFFFFB;
    margin-right: 50px;
    border-radius: 10px;
    padding: 50px 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
#form{
    display: flex;
    flex-direction: column;
    margin-top: 20px;
}

input{
    height: 40px;
    border: 2px solid #D8D8D8;
    border-radius: 10px;
    padding: 3px 10px;
    font-family: 'Open Sans', sans-serif;
    font-size: 1em;
    color: #D8D8D8;
    margin-bottom: 15px;
}
button,
.button{
    height: 50px;
    border: none;
    border-radius: 10px;
    padding: 3px 10px;
    text-align: center;
    font-family: 'Open Sans', sans-serif;
    font-size: 1.25em;
    font-weight: bold;
}
#submit{
    background-color: #FE9716;
    color: #555;
}

#hero-image-container{
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#hero-image-1{
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70% ;
    border: 2px #FFFFFB solid;
    height: 500px;
    width: 500px;
    position: absolute;
    transform: rotate(15deg);
    z-index: 1;
}

#hero-image-2{
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70% ;
    border: 5px #FFFFFB solid;
    background-image: url("https://images.unsplash.com/photo-1499651681375-8afc5a4db253?ixlib=rb-0.3.5&s=ea832c1bb3fddac1b4a2d0937d2ecb5f&auto=format&fit=crop&w=987&q=80 alt:'woman laughing'");
    background-size: cover;
    height: 500px;
    width: 500px;
    position: relative;
}

/* About Section */
section{
    margin-top: 50px;
    width: 100%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
#whatIsHugBox h2{
    text-align: center;    
}
#header-underline{
    border-bottom: 2px #01B2DE dashed;
    padding-bottom: 5px;
}
#whatIsHugBox{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-content: center;
}
.grid{
    margin-top: 50px;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: flex-start;
    flex-wrap: wrap;
    width: 100%;
    margin-bottom: -100px;
}
.grid-item{
    width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.grid-item-img{
    width: 200px;
    height: 200px;
}
.whatIsHugBox-grid-item-img{
    height: 300px;
    width: 230px;
    background-color: #01B2DE;
    border-radius: 33% 67% 30% 70% / 59% 50% 50% 41% ;
    opacity: 0.5;
}
.grid-item-text{
    display: flex;
    flex-direction: column;
}
.whatIsHugBox-grid-item-text{
    display: flex;
    flex-direction: column;
    z-index: 1;
    position: relative;
    top: -250px;
    width: 210px;
}
.grid-icon{
    font-size: 50px;
    color: #FFDF3A;
    display: flex;
    align-self: center;
}
.grid-item-text h3,
.whatIsHugBox-grid-item-text h3{
    text-align: center;
    margin-top: 1.5em;
}
.grid-item-text p{
    margin: 0;
}
#video{
    display: flex;
    flex-direction: column;
    align-self: center;
}
#about-video h3{
    text-align: center;
    margin-bottom: 30px;
}

#products{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* footer section */
footer{
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 150px;
    background-color: #FE9716;
    color: #FFFFFB;
}
#footer-form{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-content: center;
    width: 100%;
    max-width: 800px;
    flex-wrap: wrap;
}
#footer-email{
    width: 300px;
}
#footer-button{
    background-color: #555;
    color: #FFFFFB;
    width: 300px;
}

@media screen and (max-width:768px){
    #menu-icon{
        display: block;
    }
    nav ul, nav:active ul { 
		display: none;
		position: absolute;
		padding: 20px;
		background-color: #FE9716;
		right: 0px;
		top: 60px;
		width: 90%;
		border-radius: 4px 0 4px 4px;
        z-index: 10;
	}
    nav li:hover{
        background-color: #E78A14;
    }
    nav a:hover{
        border-bottom: none;
    }
    .menu {
        width: 100%;
        display: none;
        background-color: gainsboro;
    }
    nav li {
		text-align: left;
		width: 100%;
		padding: 10px 0;
		margin: 0;
	}
    nav:hover ul {
		display: block;
	}
    #hero-section{
        flex-direction: column-reverse;
        justify-content: flex-end;
        align-items: center;
        margin: 25px 10px;
    }
    #hero-image-1,
    #hero-image-2{
        height: 300px;
        width: 300px; 
    }
    #hero-text-container{
        margin: 50px 0;
        width: 100%;
    }
    #footer-form{
        width: 100%;
        flex-direction: column;
        align-items: center;
    }
        
          
}


            
          
!
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