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

              
                
  <div class="flex-container">

    <div class="sedan">
      <img src='https://svgshare.com/i/cWi.svg' title='Sedan' />
      <h1>Sedans</h1>
      <p>Choose a sedan for its affordability and excellent fuel economy. Ideal for cruising in the city 
        or on your next road trip.</p>

       <button type="button">Learn More</button>
    </div>
    <div class="SUV">
      <img src='https://svgshare.com/i/cXZ.svg' title='Suv' />

      <h1>SUVs</h1>
      <p>Take an SUV for its spacious interior, power, and versatility. Perfect for your next family vacation 
      and off-road adventures.</p>

      <button type="button">Learn More</button>
    </div>

    <div class="Luxury">
      <img src='https://svgshare.com/i/cV8.svg' title='Luxury' />
     <h1>Luxury</h1>
      <p>Cruise in the best car brands without the bloated prices. Enjoy the enhanced comfort of a luxury 
      rental and arrive in style.</p>

      <button type="button">Learn More</button>
    </div>

</div>
  <div class="attribution">
    Challenge by <a href="https://www.frontendmentor.io?ref=challenge" target="_blank">Frontend Mentor</a>. 
    Coded by <a href="#">Your Name Here</a>.
  </div>

              
            
!

CSS

              
                *{
    box-sizing: border-box;
}
body{
  background-color:#F2F2F2;
}
.flex-container{
    display:flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    flex-wrap:wrap;

}
h1{
    padding-left: 20px;
    font-stretch: condensed;
    font-family:Arial, Helvetica, sans-serif;
}
.sedan{
    height: 425px;
    width: 290px;
    background-color: #E28525;
    color:#FFF1E1;
    line-height: 1.5;
    border-radius: 20px 0px 0px 20px;
    padding: 10px;
}
 img{
    height: 60px;
    width: 85px;
    padding: 25px 0px 0px 25px;
}
 p{
    text-align:justify;
    letter-spacing: .5px;
    
   
}

.sedan button{
    border-radius: 20px;
    color: #FFD473;
    background-color: #FFF1E1;
    border: 3px solid #FFF1E1;
    height: 50px;
    margin: 70px 0px 0px 30px;
    width: 150px;
   font-weight: bold;
}
.sedan button:hover{
    color: #FFF1E1;
    background-color: #E28525;
    border: 3px solid #FFF1E1;
}
.SUV{
    background-color: #016972;
    height: 425px;
    width: 290px;
    color:#FFF1E1;
    line-height: 1.5;
    padding: 10px;
}

.SUV button{
    border-radius: 20px;
    color: #26B5C0;
    background-color: #FFF1E1;
    border: 3px solid #FFF1E1;
    height: 50px;
    margin: 70px 0px 0px 30px;
    width: 150px;
    font-weight: bold;
}
.SUV button:hover{
    color: #FFF1E1;
    background-color: #016972;
    border: 3px solid #FFF1E1;
}

.Luxury{
    background-color: #00403F;
    height: 425px;
    width: 290px;
    color:#FFF1E1;
    line-height: 1.5;
    border-radius: 0px 20px 20px 0px;
    padding: 10px;
}
.Luxury button{
    border-radius: 20px;
color: #19B89D;
background-color: #FFF1E1;
border: 3px solid #FFF1E1;
height: 50px;
margin: 70px 0px 0px 30px;
width: 150px;
font-weight: bold;
}
button{
    cursor: pointer;
}
.Luxury button:hover{
    color: #FFF1E1;
    background-color: #00403F;
    border: 3px solid #FFF1E1;
}

@media (max-width: 768px) {
    .flex-container {
      flex-direction: column;

    }
    .sedan{
        border-radius: 20px 20px 0px 0px;
    }
    .Luxury{
        border-radius: 0px 0px 20px 20px;
    }
    .sedan button{
        margin: 45px 0px 0px 30px;
    }
    .SUV button{
        margin: 45px 0px 0px 30px;
    }
    .Luxury button{
        margin: 45px 0px 0px 30px;
    }
  }
              
            
!

JS

              
                
              
            
!
999px

Console