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

              
                    <header id="header">
            <img id="header-img" src="https://img.icons8.com/external-itim2101-lineal-color-itim2101/64/000000/external-racing-car-car-itim2101-lineal-color-itim2101.png" alt="car icon"/>
            <h1 id="header-text"> Custom Car Mods</h1>
        <nav id="nav-bar">
            <ul>
                <li><a class="nav-link" href="#features">Features</a></li>
                <li><a class="nav-link" href="#customer">Customer Rides</a></li>
                <li><a class="nav-link" href="#pricing">Pricing</a></li>
            </ul>
        </nav>
    </header>

    <div>
        <h2>Handcrafted engines built with passion</h2>
        <form id="form" action="https://www.freecodecamp.com/email-submit">
            <input id="email" type="email" name="email" for="submit" placeholder="Enter your email address"><br>
            <button id="submit" name="email" for="submit">Let's go!</button>
        </form>
    </div>

    <a id="features"></a>
    <div id="description-div">
        <div class="description-group">
            <div class="description-img">
                <img src="https://img.icons8.com/external-wanicon-lineal-color-wanicon/64/000000/external-engine-car-service-wanicon-lineal-color-wanicon.png" alt="engine icon"/>
            </div>
            <div class="description-text">
                <h3>Overbuilt Engines</h3>
                <p class="description-p">We only use parts that are made well above the OEM standard to ensure your vehicle is as reliable as possible.</p>
            </div>
        </div>

        <div class="description-group">
            <div class="description-img">
                <img src="https://img.icons8.com/external-wanicon-flat-wanicon/64/000000/external-chassis-car-service-wanicon-flat-wanicon.png" alt="drivetrain icon"/>
            </div>
            <div class="description-text">
                <h3>Drivetrain Swap</h3>
                <p class="description-p">We can swap the drivetrain of any vehicle to AWD, RWD or FWD to make driving your car a custom experience.</p>
            </div>
        </div>

        <div class="description-group">
            <div class="description-img">
                <img src="https://img.icons8.com/external-filled-outline-satawat-anukul/64/000000/external-carservice-car-service-filled-outline-filled-outline-satawat-anukul-14.png" alt="turbocharger icon"/>
            </div>
            <div class="description-text">
                <h3>Turbo All The Things</h3>
                <p class="description-p">Think of any car, now imagine it with a turbo, or two, or three... or four... or maybe you want a turbo and a supercharger. Yeah we do all that.</p>
            </div>
        </div>
    </div>

    <a id="customer"></a>
    <div id="video-div">
    <iframe id="video" width="560" height="315" src="https://www.youtube-nocookie.com/embed/thZJwl3fX7k" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
    </div>

    <a id="pricing"></a>
    <div id="cards-div">
        <div class="card">
            <div class="card-image card1"></div>
            <h4>Engine Packages</h4>
            <p class="card-p">Whether you just want to make your engine more reliable or add big power, we have the right package options for you.</p>
            <button class="button">More Info</button>
        </div>

        <div class="card">
            <div class="card-image card2"></div>
            <h4>Drivetrain Packages</h4>
            <p class="card-p">We specialize in AWD conversions to make your car faster off the line and overall safer to daily drive but we can also convert your car to RWD or FWD.</p>
            <button class="button">More Info</button>
        </div>

        <div class="card">
            <div class="card-image card3"></div>
            <h4>Turbo Packages</h4>
            <p class="card-p">No matter how much power you want to make, we can make it happen. We also install hidden radar detectors, you know... for science.</p>
            <button class="button">More Info</button>
        </div>
    </div>

    <footer>
        <ul id="footer-ul">
            <li><a href="#">Privacy</a></li>
            <li><a href="#">Terms</a></li>
            <li><a href="#">Contact</a></li>
            <li><a href="https://icons8.com/">Icons by Icons8</a></li>
        </ul>

        <p id="footer-p">Copyright 2022, Custom Car Mods</p>
    </footer>
              
            
!

CSS

              
                body {
    font-family: 'Montserrat', Tahoma;
    margin: 0;
}

#header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #333;
    color: whitesmoke;
    position: fixed;
    width: 100%;
}

.nav-link {
    list-style: none;
    display: inline-block;
    padding: 0 30px;
}

#nav-bar li {
    list-style: none;
    display: inline-block;
    padding: 0 30px;
}

#features, #customer, #pricing {
    scroll-margin-top: 100px;
}

#header-text {
    margin-right: auto;
    margin-left: 10px;
}

a {
    text-decoration: none;
    color: whitesmoke;
}

a:hover {
    color: rgb(187, 187, 187);
    transition: 0.3s;
}

h2 {
    text-align: center;
    margin-top: 0;
    padding-top: 6rem;
}

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

#email {
    padding: 7px 25px;
    border-radius: 5px;
}

#submit {
    padding: 9px 22px;
    border-radius: 5px;
    color: whitesmoke;
    background-color: #900;
    border: none;
    margin-bottom: 4rem;
}

#submit:hover {
    cursor: pointer;
    background-color: rgb(105, 0, 0);
    transition: 0.3s;
}

.description-group {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 10px 0;
}

.description-text {
    width: 50%;
    padding-left: 3rem;
}

h3 {
    text-align: left;
    margin-bottom: 10px;
}

.description-p {
    margin-top: 0;
}

#description-img {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

#video {
    display: block;
    margin: 4rem auto;
}

#cards-div {
    display: flex;
    justify-content: center;
}

iframe {
    border-radius: 10px;
}

.card {
    background-color: #333;
    color: whitesmoke;
    width: 350px;
    height: 400px;
    margin: 20px;
    border-radius: 10px;
}

.card:hover {
    background-color: whitesmoke;
    color: #333;
    transition: 0.5s;
    cursor: pointer;
}

.card-p, h4{
    margin: 10px;
}

.card-image {
    height: 200px;
    margin-bottom: 15px;
    background-size: cover;
    border-radius: 10px 10px 0 0;
}

.card1 {
    background-image: url(https://images.pexels.com/photos/3689314/pexels-photo-3689314.jpeg?auto=compress&cs=tinysrgb&dpr=2&w=500);
}

.card2 {
    background-image: url(https://images.pexels.com/photos/11097899/pexels-photo-11097899.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260);
}

.card3 {
    background-image: url(https://images.unsplash.com/photo-1591879742348-13012c2963bf?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1470&q=80);
}



.button {
    background-color: #900;
    color: whitesmoke;
    border: none;
    border-radius: 5px;
    padding: 7px;
    margin: 20px auto 0;
    display: block;
    text-align: center;
    cursor: pointer;
}

.button:hover {
    background-color: rgb(105, 0, 0);
    transition: 0.3s;
}

footer {
    background-color: #333;
    text-align: right;
    width: 90%;
    margin: auto;
    border-radius: 5px 5px 0 0;
}

footer p {
    color: rgb(160, 160, 160);
    padding: 5px 15px 5px;
    margin-bottom: 0;
}

footer li {
    display: inline-block;
    list-style: none;
    color: whitesmoke;
    padding: 15px 15px 0px;
}

#footer-ul {
    margin-bottom: 0;
}

@media all and (max-width: 500px) {
    #cards-div {
        display: block;
    }
}

/* I need to learn to mobile first because this is a nightmare doing it the */
/* other way around lol. Next time! */
              
            
!

JS

              
                
              
            
!
999px

Console