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

              
                <!DOCTYPE html>
<html lang="en">
  <link rel="stylesheet" href="styles.css">
<head>
 <meta charset="UTF-8"></meta>
 <meta name="viewport" content="width=device=width, initial-scale=1.0"></meta>
 <section>
<title>Space Dev Portfolio Website, Welcome</title>
<linl rel="stylesheet" />

<!-- font awesome style sheet link -->
<script src="https://kit.fontawesome.com/d11d0d7abc.js" crossorigin="anonymous"></script>



<!-- google font link, font name "Roboto" from sans-serif

css: font-family: 'Roboto', sans-serif;
-->

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;500&display=swap" rel="stylesheet">


</head>


<body>
<header>
   <div class="logo">
   <img id="logo" src="https://img.freepik.com/free-vector/empty-spacesuit-helmet-black-astronaut-portrait-space-logo_80590-12346.jpg" width="50">
   </div>

   <button class="nav-toggle" aria-label="toggle navigation">
     <span class="hamburger"></span>
   </button>
  
<nav class="navbars" id="navbar">
<ul class="nav__list">
<li class="nav__item"><a href="#home" class="nav__link">Home</a></li>
<li class="nav__item"><a href="#services" class="nav__link">Services</a></li>
<li class="nav__item"><a href="#about" class="nav__link">About Me</a></li>
<li class="nav__item"><a href="#work" class="nav__link">My Work</a></li>
</ul>
</nav>

</header>

<!--Introduction-->

<section class="intro" id="welcome-section">
  <h1 class="section__title section__title--intro">
    Hello, welcome to <strong>Space Travel</strong> 
  </h1>
  <p class="section__subtitle section__subtitle--intro">Space Travel and Beyond as a dev</p>
  <img src="https://media.wired.com/photos/5a593a7ff11e325008172bc2/master/pass/pulsar-831502910.jpg" alt="a picture of an astronaut standing on the moon looking at earth" class="intro__img" width="600"> 
</section>

<!-- My Space Dev Services-->
<section class="my-space-dev-services" id="services">
<h2 class="section__title section__title--services">My Space Dev Services</h2>

<div class="services">

  <div class="service">
    <h3>WordPress</h3>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
      </div> <!-- /service-->

<div class="service">
      <h3>Web Design</h3>
      <p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </p>
        </div> <!-- / service -->
    
<div class="service">
      <h3>SEO</h3>
      <p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </p>
        </div> <!-- / service -->

</div> <!-- / services -->

<a href="#work" class="btn">My Work</a>
</section>

<!-- About This Space Dev-->
<section class="about-me" id="about">
  <h2 class="section__title section__title--about">Who I am</h2>
  <p class="section__subtitle section__subtitle--about">SEO and WordPress developer</p>

<div class="about-me__body">
  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. </p>
  
  <p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. </p>
</div>

<img src="https://nypost.com/wp-content/uploads/sites/2/2022/02/astronaut-306.jpg?quality=90&strip=all" width="500" alt="" class="about-me__img">
</section>

<!-- My Work-->
<section class="my-work" id="projects">
  <h2 class="section__title section__title--work">My Work</h2>
  <p class="section__subtitle section__subtitle--work">The work I have done and things I've made</p>

  <div class="portfolio">
    
    <!-- portfolio item 01 -->
    <a href="#" class="project-tile">
      <img src="https://d1e00ek4ebabms.cloudfront.net/production/a48d4541-99cb-44f4-984b-8291abc3f95a.jpg" height="360" alt="" class="portfolio__img">
      </a>

     <!--  portfolio item 02 -->
    <a href="#" class="project-tile">
      <img src="https://i.natgeofe.com/k/0fddbed0-75b7-4f61-95e2-19e036b32b04/astronaut1.png" height="360" alt="" class="portfolio__img">
      </a>


      <!-- portfolio item 03--> 
    <a href="#" class="project-tile">
      <img src="https://www.cae.com/media/images/210614-CAEDSWEB-Images-MultiDomain_Space-Overview-reduced.jpeg" height="360" alt="" class="portfolio__img">
      </a>

      <!-- portfolio item 04--> 
   <a href="#" class="project-tile">
      <img src="https://s3.wp.wsu.edu/uploads/sites/2797/2022/03/space.jpg" height="360" alt="" class="portfolio__img">
      </a>

      <!-- portfolio item 05 -->
   <a href="#" class="project-tile">
      <img src="https://cdn.mos.cms.futurecdn.net/nfZYT7SrLCY5EaaPVSScLG.png" height="360" alt="" class="portfolio__img">
      </a>

      <!-- portfolio item 06 -->
    <a href="#" class="project-tile">
      <img src="https://www.airbus.com/sites/g/files/jlcbta136/files/styles/airbus_480x480/public/2021-07/sustainable-space.jpg?itok=iDPzb4L8" height="360" alt="" class="portfolio__img">
    </a>

      <!-- portfolio item 07 -->
    <a href="#" class="project-tile">
      <img src="https://i.natgeofe.com/n/8a3e578f-346b-479f-971d-29dd99a6b699/nationalgeographic_2751013_16x9.jpg" height="360" alt="" class="portfolio__img">
    </a>

      <!-- portfolio item 08 -->
    <a href="#" class="project-tile">
      <img src="https://media.wired.com/photos/5a593a7ff11e325008172bc2/master/pass/pulsar-831502910.jpg" height="360" alt="" class="portfolio__img">
    </a>

      <!-- portfolio item 09 -->
    <a href="#" class="project-tile">
      <img src="https://www.arabnews.com/sites/default/files/styles/n_360_212/public/main-image/2022/02/03/3050356-207344367.jpg?itok=G5R0hMoA" height="360" alt="" class="portfolio__img">
    </a>

      <!-- portfolio item 0 0 -->
    <a href="#" class="project-tile">
      <img src="https://lh3.googleusercontent.com/_VZesw5O-D3IV5rBLBiRFZ_9XReFoLJ3i4gje818qJb4BKyKi9D8cD1BF_V2l-45d6S2IQnT5aCzWta8gtOzgfvJmg=w640-h400-e365-rj-sc0x00ffffff" height="360" alt="" class="portfolio__img">
    </a>
  </div>
</section>


<!-- Footer-->
<footer class="footer">
  <!-- enter your own email address-->
  <a href="keepreading52@gmail.com" class="footer__link">keepreading.dev</a>

    <ul class="social-list">

    <li class="social-list__item">
      <a class="social-list__link" href="https://twitter.com">
        <i class="fa-brands fa-twitter-square"></i>
      </a>
    </li>

    
    <li class="social-list__item">
      <a class="social-list__link" href="https://www.reddit.com">
        <i class="fa-brands fa-reddit-square"></i>
      </a>
    </li>

    
    <li class="social-list__item">
      <a class="social-list__link" href="https://github.com/">
        <i class="fa-brands fa-github"></i>
      </a>
    </li>

    <li class="social-list__item">
      <a class="social-list__link" id="profile-link" target="_blank" href="https://codepen.io/">
        <i class="fa-brands fa-codepen"></i>
      </a>
    </li>

  </ul>

</footer>

</body>
</html>
              
            
!

CSS

              
                *,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --ff-primary: 'Roboto', sans-serif;

  --fw-reg: 300;
  --fw-bold: 900;

  --clr-light: #D3D3D3;
  --clr-dark: #404040;
  --clr-accent: #ECCC87;

  --fs-h1: 3rem;
  --fs-h2: 2.23rem;
  --fs-h3: 1.25rem;
  --fs-body: 1rem;

  --bs: 0.25em 0.25em 0.75em rgba(0, 0, 0, .25),
  0.125em 0.125em 0.25em rgba(0, 0, 0, .15);
}


@media (min-width: 800px) {
  :root {
    --fs-h1: 4.5rem;
    --fs-h2: 3.75rem;
    --fs-h3: 1.5rem;
    --fs-body: 1.125rem;
  }
}

body {
  /*font-family: 'Roboto', sans-serif;*/
  background: light;
  color: var(--clr-dark);
  margin: 0;
  font-family: var(--ff-primary);
  font-size: var(--fs-body);
  line-height: 1.6;
}

section {
  padding: 5em 2em;
}

img {
  display: block;
  max-width: 100%;
}

.strong { font-weight: var(--fw-bold) }

:focus {
  outline: 3px solid var(--clr-accent);
  outline-offset: 3px;
}

/* buttons */

.btn {
  display: inline-block;
  padding: .5em 2.5em;
  background: var(--clr-accent);
  color: var(--clr-dark);
  text-decoration: none;
  cursor: pointer;
  font-size: .8em;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: var(--fw-bold);
  transition: transform 200ms ease-in-out;
}

.btn:hover {
  transform: scale(1.1);
}


/* Typography */

h1,
h2,
h3 {
  line-height: 1.1;
  margin: 0;
}



h1 { font-size: var(--fs-h1) }
h2 { font-size: var(--fs-h2) }
h3 { font-size: var(--fs-h3) }

section__title {
   margin-bottom: .25em;
}

.section__title--intro {
  font-weight: var(--fw-reg);
}

.section__title--intro strong {
  display: block;
}

.section__subtitle {
  margin: 0;
  font-size: var(--fs-h3);
}

.section__subtitle--intro,
.section__subtitle--about {
   background: var(--clr-accent);
   padding: .25em 1em;
   font-family: var(--ff-secondary);
   margin-bottom: 1em;
}

/* header */



header {
  display: flex;
  justify-content: space-between;
  padding: 1em;
}

.logo {
  max-width: 100px;
}

.navbars {
  position: fixed;
  background: var(--clr-dark);
  color: var(--clr-light);
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;

  transform: translateX(100%);
  transition: transform 250ms cubic-bezier(.5, 0, .5, 1);
}

.nav__list {
  list-style: none;
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav__link {
  color: inherit;
  font-weight: var(--fw-bold);
  font-size: var(--fs-h3);
  text-decoration: none;
}

.nav__link:hover {
  color: var(--clr-accent);
}

.nav-toggle {
  padding: .5em;
  background: transparent;
  border: 0;
  cursor: pointer;
  position: absolute;
  right: 1em;
  top: 1em;
  z-index: 100;
}

.hamburger {
  display: block;
  position: relative;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  background: var(--clr-dark);
  width: 2em;
  height: 3px;
  border-radius: 1em;
  transition: transform 250ms ease-in-out;

}



.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
}

.hamburger::before {top: 6px;}
.hamburger::after { bottom: 6px;}

/* intro section*/

.intro {
  position: relative;
}

.intro__img {
  box-shadow: var(--bs); /* bs short for box shadow*/
}

.section__subtitle--intro {
  display: inline-block;
}

@media (min-width: 600px) {
  .intro {
    display: grid;
    width: min-content;
    margin: 0 auto;
    grid-column-gap: 1em;
    grid-template-areas:
    "img title"
    "img subtitle";
    grid-template-columns: min-content max-content;
  }

  .intro__img {
    grid-area: img;
    min-width: 250px;
    position: relative;
    z-index: 2;
  }

  .section__subtitle--intro {
    align-self: start;
    grid-column: -1 / 1;
    grid-row: 2;
    text-align: right;
    position: relative;
    left: -1.5em;
    width: calc(100% + 1.5em);
  }
}
/* my space dev services section*/


.my-space-dev-services {
  background-color: var(--clr-dark);
  background-image: url(https://img.freepik.com/free-vector/space-background-galaxies-milky-way-galaxy-beautiful-cosmos_370567-1447.jpg?w=2000);
  background-size: cover;
  background-blend-mode: multiply;
  color: var(--clr-light);
  text-align: center;
}

.section__title--services {
  color: var(--clr-accent);
  position: relative;
}

.section__title--services::after {
  content: '';
  display: block;
  width: 2em;
  height: 1px;
  margin: 0.5em auto 1em;
  background: var(--clr-light);
  opacity: 0.25;
}

.services {
  margin-bottom: 4em;
}

.service {
  max-width: 500px;
  margin: 0 auto;
}

@media (min-width: 800px) {
  .services {
    display: flex;  
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
  }
  .service + .service {
    margin-left: 2em;
  }
}


/*about*/
.about-me {
  max-width: 1000px;
  margin: 0 auto;
}

.about-me__img {
  box-shadow: var(--bs);
}

@media (min-width: 600px) {
  .about-me {
    display: grid;
    grid-template-columns: 1fr 300px;
    grid-template-areas: 
        "title img"
        "subtitle img"
        "text img";
        grid-column-gap: 2em;
  }

  .section__title--about {
    grid-area: title;
  }
  
  .intro--about {
    grid-column: 1 / -1;
    grid-row: 2;
    position: relative;
    left: -1em;
    width: calc(100% + 2em);
    padding-left: 1em;
    padding-right: calc(200px + 4em);
  }

  .about-me__img {
    grid-area: img;
    position: relative;
    z-index: 2;
  }
}

.my-work {
  background-color: var(--clr-dark);
  color: var(--clr-light);
  text-align: center;
}

.section__subtitle--work {
  background-color: var(--clr-dark);
  color: var(--clr-light);
  text-align: center;
}

.portfolio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.project-tile {
  background: var(--clr-accent);
  overflow: hidden;
}

.portfolio__img {
  transition: 
  trasform 750ms cubic-bezier(.5, 0, .5, 1),
  opacity 250ms linear;
}

.project-tile:focus {
  position: relative;
  z-index: 2;
}

portfolio__img:hover,
.project-tile:focus .portfolio__img {
  transform: scale(1.2);
  opacity: .75;
}

/* footer */

.footer {
  background: #111;
  color: var(--clr-accent);
  text-align: center;
  padding: 2.5em 0;
  font-size: var(--fs-h3);
}

.footer a { 
  color: inherit;
  text-decoration: none;
  }

  .footer__link {
    
    font-weight: var(--fw-bold);
  }

.footer__link:hover,
.social-list__link:hover {
  opacity: .7;
}

.footer__link:hover {
  text-decoration: underline;
}

.social-list {
  list-style: none;
  display: flex;
  justify-content: center;
  margin: 2em 0 0;
  padding: 0;
}

.social-list__item {
  margin: 0 .5em;
}

.social-list__link {
  padding: .5em;
}

              
            
!

JS

              
                
              
            
!
999px

Console