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

              
                <head>
  <div class="header-parent">
    <div class="header-child">
      
      <div class="logo-container"> 
        <h1>Boxes<span>Plus</span></h1>
      </div>
      
      <ul class="nav">
        <a href="#"><li>Home</li></a>
        <a href="#"><li>About</li></a>
        <a href="#"><li>Services</li></a>
        <a href="#"><li>Contact</li></a>
      </ul>
      
    </div>
  </div>
</head>

<body>
  
  <section class="hero-banner">    
    <div class="hero-para-wrap">
      <p class="hero-para">Quality boxes delivered<br>straight to your door!</p>
    </div>
    <div class="hero-side-wrap">
      <p class="hero-side">Delivering<br>Quality<br>Since<br>Before<br>1974</p>
    </div>
    <img class="bg-img" src="https://images.pexels.com/photos/761999/pexels-photo-761999.jpeg?cs=srgb&dl=pexels-andrea-piacquadio-761999.jpg&fm=jpg">
  </section>  
    
  <section class="container">
    <h2>Become a Boxing Pro Today!</h2>
    <a href="#"><div class="box box-1">BASIC | $11.99/month</div><a>
    <a href="#"><div class="box box-2">ADVANCED | 17.99/month</div><a>
    <a href="#"><div class="box box-3">PRO | 24.99/month</div><a>
    <p>Actual boxes may vary in size, condition, and shape.<br>Please contact your box dealer for specifications.<br>Restrictions apply.</p>
  </section>
      
  <section class="stories">
    <h2>Customer Testimonials</2>
    <div class="story-box story-1">
      <p>"Before I was a patron, I'd always run into issues with not having enough boxes for my boxing needs, but now I have all the boxes I could ever want! I had no idea there were so many uses for boxes! I don't even need furniture anymore!"</p>
      <h6>- John Doe</h6>
    </div>
    <div class="story-box story-2">
      <p>"This service is so great. Life-changing, in fact. (Can we get another subscription level? Something like "Elite" or "Platinum?") Thank you, <em>Boxes Plus</em>!"</p>
      <h6>- Larry Buck</h6>
    </div>
    <div class="story-box story-3">
      <p>"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Neque gravida in fermentum et sollicitudin ac orci phasellus. Eleifend mi in nulla posuere sollicitudin."</p>
      <h6>- Lorem Ipsum</h6>
    </div>
  </section>  

  <footer>
    <div class="nav-foot-wrap">  
      <ul class="nav-footer">
        <a href="#"><li>Home</li></a>
        <a href="#"><li>About</li></a>
        <a href="#"><li>Services</li></a>
        <a href="#"><li>Contact</li></a>
      </ul>
    </div>
    <h6>topyright 2021</h6>
  </footer>
  
</body>
              
            
!

CSS

              
                /* 
    > Time for CSS practice 2, just follow these specs
    > First, look at the HTML tab to see what elements we are working with, then...
    > Create a selector for h1, then...
        -center the h1 text
    > Create a selector for the "box" class and add the following CSS
        -center the text inside the boxes 
        -add a border, 2px solid black
        -top and bottom padding 20px, left and right 10px
        -20px margin on all 4 sides
    > Now, create selectors for each individual box class (ex "box-1")
        -make box 1 a nice shade of blue
        -make box 2 a nice shade of red
        -make box 3 a nice shade of green
    > Add some margin on the "container" class
        -Try 10vw!
*/

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  list-style: none;
  text-decoration: none;
}

/* ---------- BOX THEME COLORS ---------- */
:root {
  --blue-light: #5602F2; /* rgba(86, 2, 242, 1) */
  --blue-medium: #3D02A8; /* rgba(61, 2, 168, 1) */
  --blue-dark: #280666; /* rgba(40, 6, 102, 1) */
  --emerald-light: #32DBAF; /* rgba(50, 219, 175, 1) */
  --emerald-dark: #288F74; /* rgba(40, 143, 116, 1) */
  --emerald-darker: #1A5E4C; /* rgba(26, 94, 76, 1) */
  --grey-comp: #B0C6D9; /* rgba(176, 198, 217, 1) */
  --shirt-blue: #b6c8de; /* rgba(182,200,222, 1) */
  --tan-light: #BFAE99; /* rgba(191, 174, 153, 1) */
  --tan-medium: #B38E4A; /* rgba(179, 142, 74, 1) */
  --tan-dark: #402F18; /* rgba(64, 47, 24, 1) */
  --teal-light: #2A98C7; /* rgba(42, 152, 199, 1) */
  --teal-medium: #207396; /* rgba(32, 115, 150, 1) */
  --teal-dark: #104A63; /* rgba(16, 74, 99, 1) */
  --yellow-lighter: #F0C900; /* rgba(240, 201, 0, 1) */
  --yellow-light: #F2B705; /* rgba(243, 200, 0, 1) */
  --yellow-medium: #BF7E04; /* rgba(191, 126, 4, 1) */
  --yellow-dark: #59450A; /* rgba(89, 69, 10, 1) */
  --violet-dark: #3C0975; /* rgba(60, 9, 117, 1) */
  --violet-darker: #30085E /* rgba(48, 8, 94, 1) */

}
body {
  background-color: var(--yellow-light);
  letter-spacing: .08rem;
  min-width: 650px;
  width: 100%;
}

/* ---------- HEADER ---------- */
.header-parent {
  background-color: #101010;
  display: block;
  height: 80px;
  min-width: 650px;
  width: 100%;
}

.header-child {
  color: white;
  display: block;
  height: 100%;
  margin: 0 auto;
  min-width: 100px;
  width: 90%;
}

/* ---------- LOGO  ---------- */
.logo-container {
  display: table;
  float: left;
  height: 100%;
}

.logo-container h1 {
  color: inherit;
  display: table-cell;
  font-family: 'Montserrat';
  font-size: 32ps;
  font-weight: 200;
  height: 100%;
  text-transform: uppercase;
  vertical-align: middle;
}

.logo-container h1 span {
  color: var(--yellow-light);
  font-weight: 800;
}

/*
h1 {
  display: flex; 
  justify-content: center;
}
*/

/* ---------- NAVIGATION ---------- */
.nav {
  float: right;
  height: 100%;
}

.nav a {
  display: table;
  float: left;
  font-size: 1rem;
  height: 100%;
  padding: 0 20px;
  /* text-transform: uppercase; */
}

.nav a li {
  height: 100%;
  display: table-cell;
  vertical-align: middle;
}

.nav a:last-child {
  padding-right: 0;
}

a,
a:hover,
a:visited {
  color: inherit;
}

/* ---------- HERO BANNER ---------- */
.hero-banner {
  position: relative;
}

.hero-para-wrap {
  background-color: rgba(191, 174, 153, 1);
  border: 4px solid rgba(10, 10, 10, 1);
  color: rgb(10, 10, 10);
  height: 15%;
  left: 31%;
  min-width: 230px;
  position: absolute;
  text-align: center;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 27vw;
}

.hero-para {
  font-size: 1.8vw;
  font-weight: 400;
  left: 50%;
  line-height: 1.35em;
  margin: 0;
  min-width: 175px;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
}

.hero-side-wrap {
  color: rgb(10, 10, 10);
  height: 20%;
  right: 5%;
  min-width: 230px;
  position: absolute;
  text-align: right;
  top: 50%;
  transform: translate(0, -50%);
  width: 30vw;
}

.hero-side {
  font-size: 2vw;
  font-weight: 400;
  left: 50%;
  line-height: 4.5em;
  margin: 0;
  min-width: 175px;
  position: absolute;
  text-transform: uppercase;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
}

.bg-img {
  display: block;
  height: 50%;
  max-height: 800px;
  object-fit: cover;
  object-position: center center;
  width: 100%;
}

/* ---------- SUBSCRIPTION MODEL ---------- */
.container {
  /* margin: 10vw auto; */
  background-color: var(--violet-dark);
  color: white;
  margin: 0 auto;
  min-width: 450px;
  height: 100%;
  padding: 60px 0;
  width: 100%;
}

.container h2,
.container p {
  text-align: center;
  text-transform: uppercase;
  padding: 0px 15px 5px;
}

.container p {
  font-size: .8rem;
  opacity: .4;
  text-transform: none;
}

.box {
  background-color: rgba(255, 255, 255, .4);
  border: 2px solid;
  border-radius: 45px;
  /* margin: 20px; */
  min-width: 300px;
  margin: 30px auto;
  padding: 20px 10px;
  text-align: center;
  width: 60%;
  max-width: 750px;
}

.box-1 {
  border: 5px solid rgba(255, 255, 255, .4);  
}

.box-2 {
  border: 5px solid rgba(255, 255, 255, .7);
}

.box-3 {
  border: 5px solid rgba(255, 255, 255, 1);
}

/* ---------- STORIES SECTION ---------- */
.stories {
  /* background-color: var(--emerald-dark); */
  background-color: var(--teal-light);
  color: white;
  display: block;
  padding: 60px 0;
}

.story-box {
  background-color: rgba(255, 255, 255, .3);
  border-radius: 15px;
  min-width: 300px;
  margin: 30px auto;
  max-width: 1000px;
  padding: 20px 50px;
  text-align: center;
  text-align: justify;
  width: 80%;
}

.stories h2 {
  text-align: center;
  text-transform: uppercase;
  padding: 0px 15px 5px;  
}

.stories p {
  font-size: 1rem;
  text-transform: none;
}

.stories h6 {
  text-align: right;
  
}

.story-1 {
  transform: translate(-10%)
}

.story-2 {}

.story-3 {
  transform: translate(10%)
}

/* ---------- FOOTER ---------- */
footer {
  background-color: #101010;
  color: rgba(255, 255, 255, .5);
  font-size: .8rem;
}

.nav-footer {
  align-items: center;
  color: rgba(255, 255, 255, .8);
  padding: 25px;
  text-align: left;
}

.nav-foot-wrap {
  display: flex;
  flex-direction: row;
  justify-content: center; 
}

footer h6 {
  padding: 0 0 25px;
  text-align: center;
}
              
            
!

JS

              
                
              
            
!
999px

Console