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

              
                <html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Product Landing Page</title>
    <link rel="stylesheet" href="style2.css">
</head>

<body>

    <main id="container">

        <section class="sect-1">

            <header id="header">
                <div id="sub-head">
                    <img src="#" id="header-img">
                    <span></span>
                    <nav id="nav-bar">
                        <ul id="ul">
                            <li class="li"><a href="#home-div" class="nav-link">Home</a></li>
                            <li class="li"><a href="#contact-div" class="nav-link">Contact Us</a></li>
                            <li class="li"><a href="#guide-div" class="nav-link">Guide</a></li>
                        </ul>
                    </nav>
                </div>
            </header>

        </section>

        <section class="sect-2">

            <div id="home-div">
                <div id="desc-heading">
                    <h1>Who We Are</h1>
                    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempora et autem sunt veniam debitis
                        fugiat
                        veritatis </p>
                </div>
                <ul>
                    <li>
                        <h3>Big Title Heading</h3>
                        <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Tenetur dolore architecto quod
                            debitis
                            placeat ex harum, vitae deserunt </p>
                    </li>
                    <li>
                        <h3>Big Title Heading</h3>
                        <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Tenetur dolore architecto quod
                            debitis
                            placeat ex harum, vitae deserunt </p>
                    </li>
                    <li>
                        <h3>Big Title Heading</h3>
                        <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Tenetur dolore architecto quod
                            debitis
                            placeat ex harum, vitae deserunt </p>
                    </li>
                </ul>
            </div>
            <div id="contact-div">

                <form id="form" action="https://www.freecodecamp.com/email-submit" target="_blank" method="GET">
                    <label for="#"> Signup to our Newsletter
                        <input id="email" type="email" placeholder="Email address..." name="email" required>
                    </label>
                    <input type="submit" id="submit">
                </form>

            </div>
            <div id="guide-div">
                <iframe src="https://www.youtube.com/embed/wfaDzSL6ll0" title="YouTube video player" frameborder="0"
                    allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
                    allowfullscreen id="video">If you can"t play this video then you will need a modern browser that
                    support
                    video playing. Please switch to a modern browser 😉😊</iframe>
            </div>

        </section>

        <section class="sect-3">

            <footer id="footer">
                <p>Copyright &copy; 2021 Company Name</p>
                <p>Designed and Developed by <span>@Danny_DOC</span></p>
            </footer>

        </section>

    </main>

</body>

</html>
              
            
!

CSS

              
                /** Global Styles **/
:root {
    font-family: "Inter";
    font-size: 16px;
    --bg-primary: #bf0f03;
    --bg-secondary: #5e0000;
    --bg-primary-lightshade: #FA5031;
    --font-fg: #ffb5b5;
    --body-padding: 20px;
    --input-valid-border: #005e00;
    scroll-behavior: smooth;
}

* {
    padding: 0;
    margin: 0;
}

body {
    background: var(--bg-primary);
    max-width: 100vw;
    display: flex;
    justify-content: center;
    padding: var(--body-padding) 0;
}

main#container {
    height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    grid-template-columns: 95vw;
    grid-row-gap: 10px;
}

/** Header Section Styles **/
#header {
    position: fixed;
    top: 0;
    left: 0;
    padding: 20px;
    margin-bottom: 60px;
}


#sub-head {
    /* width: 90%; */
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 2fr 3fr;
    background: var(--bg-secondary);
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.468);
}

#nav-bar {
    display: grid;
    grid-template-columns: 100%;
    align-items: center;
}

#nav-bar ul {
    width: 100%;
    display: grid;
    grid-column-gap: 10px;
    grid-template-columns: 1fr 1fr 1fr;
    justify-items: center;
}

.li {
    list-style: none;
}

.li a {
    text-decoration: none; 
    color: #fff;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.li a:hover {
    color: var(--font-fg);
}

/** Content Section Styles **/
.sect-2 {
    display: grid;
    justify-content: center;
    grid-template-columns: 55% 40%;
    grid-template-rows: 55% 40%;
    grid-gap: 20px;
    padding: 10px 0;
    margin-top: 50px;
}

.sect-2 > div {
    background: var(--bg-primary-lightshade);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}

/** Home Div Styles **/
#home-div {
    grid-area: 1/1/3/2;
    display: grid;
    grid-template-rows: auto 1fr;
    grid-row-gap: 10px;
    justify-content: flex-start;
}

#desc-heading {
    margin: 20px 0;
}

#desc-heading h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

#home-div ul li {
    list-style: none;
    margin-bottom: 20px;
}

/** Contact Div Style **/
#contact-div {
    grid-area: 1/2/2/2;
    display: flex;
    justify-content: center;
}

#form {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
}

#form label {
    font-size: 1.5rem;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    height: 50%;
    width: 100%;
    text-align: center;
}

#email {
    width: 100%;
    height: 40px;
    padding: 20px;
    outline: none;
    border: none;
    border-radius: 20px;
    font-family: "Maven Pro";
    transition: 0.5s ease;
}

#email:focus:invalid {
    box-shadow: inset 0 0 0 2px var(--bg-primary);
}


#email:focus:valid {
    box-shadow: inset 0 0 0 2px var(--input-valid-border);
}


#submit {
    width: 8rem;
    height: 3rem;
    font-size: 1.2rem;
    border: none;
    border-radius: 20px;
    background: var(--bg-secondary);
    color: #fff;
    transition: 0.2s ease;
}

#submit:hover {
    background: var(--bg-primary);
}

/** Guide Div Styles **/
#guide-div {
    grid-area: 2/2/3/3;
    padding: 0;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

iframe {
    width: 100%;
    height: 100%;
}



/** Footer Section Style **/
.sect-3 {
    display: grid;
    grid-template-columns: 100%;
}

#footer {
    background: var(--bg-secondary);
    padding: 25px 50px;
    border-radius: 50px;
    align-items: flex-end;
    color: #fff;
}

#footer p {
    letter-spacing: 0.7px;
    font-weight: 400;
    margin-bottom: 10px;
}

#footer p:nth-of-type(2) {
    color: rgb(255, 193, 193);
    font-weight: 500;
    font-size: 1.2rem;
    letter-spacing: 0.7px;
    line-height: 30px;
    margin-bottom: 0 !important;
}

#footer p span {
    background: var(--bg-primary-lightshade);
    padding: 5px;
    color: var(--bg-secondary);
    border-radius: 5px;
}


/** Media Queries and Mobile Design **/
@media (max-width: 800px) {
    /** Mobile Header Section Styles **/
    #sub-head {
        grid-template-columns: 100% !important;
        justify-items: center;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.461);
    }

    #sub-head img, #sub-head span    {
        display: none;
    }

    #nav-bar {
        width: 100%;
    }

    #nav-bar ul {
        justify-items: center;
    }

    .li a{
        font-size: 1.1rem;
    }

    /** Mobile Content Section Styles **/
    .sect-2 {
        grid-template-columns: 100%; 
        grid-template-rows: 4.5fr 2.5fr 3fr;
    }

    #home-div {
        grid-area: 1/1/2/2;
    }

    #contact-div {
        grid-area: 2/1/3/2;
    }

    #email {
        height: 30px;
    }

    #guide-div {
        grid-area: 3/1/4/2;
    }


    /** Mobile Footer Section Styles **/
    footer {
        text-align: center;
    }
    footer h3 {
        font-size: 1.2rem;
    }
}
              
            
!

JS

              
                // !! IMPORTANT README:

// You may add additional external JS and CSS as needed to complete the project, however the current external resource MUST remain in place for the tests to work. BABEL must also be left in place. 

/***********
INSTRUCTIONS:
  - Select the project you would 
    like to complete from the dropdown 
    menu.
  - Click the "RUN TESTS" button to
    run the tests against the blank 
    pen.
  - Click the "TESTS" button to see 
    the individual test cases. 
    (should all be failing at first)
  - Start coding! As you fulfill each
    test case, you will see them go   
    from red to green.
  - As you start to build out your 
    project, when tests are failing, 
    you should get helpful errors 
    along the way!
    ************/

// PLEASE NOTE: Adding global style rules using the * selector, or by adding rules to body {..} or html {..}, or to all elements within body or html, i.e. h1 {..}, has the potential to pollute the test suite's CSS. Try adding: * { color: red }, for a quick example!

// Once you have read the above messages, you can delete all comments. 

              
            
!
999px

Console