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

              
                <!-- Fixed nav bar !-->
<div id="navbar">
  <a class="nav-link" href="#welcome-section">About</a>
  <a class="nav-link" href="#projects">My Projects</a>
  <a class="nav-link" href="#contact">Contact</a>
</div>

<!-- <main> element to separate content of webpage from nav bar for different CSS styling !-->
<main id="main">

  <!-- 'Welcome' section of webpage !-->
  <div id="welcome-section">
    <h1 id="welcome"> Welcome! </h1>
    <p id="welcome-paragraph"> My name is Lisa, I am a beginner web developer, currently learning HTML and CSS. Please check out my work so far! </p>

    <!-- Link to next section (projects section), styled as a down arrow in CSS !-->
    <a href="#projects" class="arrow-link">
      <div class="arrow-down">
      </div>
    </a>
  </div>

  <!-- 'Projects' section of webpage !-->
  <div id="projects">
    <h2 class="myprojects"> My Projects </h2>

    <!-- Element contains links to projects, styled as a grid in CSS !-->
    <div class="projects-container">
      <a class="project-tile" href="https://codepen.io/IkeaFlowers/pen/rNwEKeZ" target="_blank">
        <img src="https://codepen.io/IkeaFlowers/pen/rNwEKeZ/image/large.png" alt="Florence Nightingale Tribute Page">
        <figcaption>Florence Nightingale Tribute Page</figcaption>
      </a>
      <a class="project-tile" href="https://codepen.io/IkeaFlowers/pen/ExvjOOd" target="_blank">
        <img src="https://codepen.io/IkeaFlowers/pen/ExvjOOd/image/large.png" alt="Cooking Survey Form">
        <figcaption>Cooking Survey Form</figcaption>
      </a>
      <a class="project-tile" href="https://codepen.io/IkeaFlowers/pen/pordOxw" target="_blank">
        <img src="https://codepen.io/IkeaFlowers/pen/pordOxw/image/large.png" alt="Product Landing Page">
        <figcaption>Product Landing Page</figcaption>
      </a>
      <a class="project-tile" href="https://codepen.io/IkeaFlowers/pen/QWqbOGx" target="_blank">
        <img src="https://codepen.io/IkeaFlowers/pen/QWqbOGx/image/large.png" alt="Technical Documentation Page">
        <figcaption>Technical Documentation Page</figcaption>
      </a>
    </div>

    <!-- Link to next section (contact section), styled as down arrow in CSS !-->
    <a class="arrow-link2" href="#contact">
      <div class="arrow-down2">
      </div>
    </a>
  </div>
  <!-- 'Contact' section of webpage !-->
  <div id="contact">
    <h2 class="center">Contact</h2>
    <p class="center">Feel free to contact me via FreeCodeCamp!</p>
    <a href="https://www.freecodecamp.org/fcca5d5df78-00cb-4cfe-8a6e-a79aeaa8f874" id="profile-link" target="_blank" class="center">My FreeCodeCamp Profile</a>
  </div>

</main>
              
            
!

CSS

              
                /* Codes the scroll behaviour of the page */
html {
  scroll-behavior: smooth;
}

/* Removes the default margin of the page*/
body {
  margin: 0;
}

/* Styles the navigation bar */
#navbar {
  margin: 0;
  padding: 0;
  top: 0;
  position: fixed;
  width: 100vw;
  height: 10vh;
  background: #ffe6f3;
  display: flex;
  justify-content: space-around;
  z-index: 1;
}

/* Styles the individual links within the navigation bar */
.nav-link {
  text-decoration: none;
  text-align: center;
  display: block;
  height: 100%;
  width: 100%;
  font-family: calibri, sans-serif;
  line-height: 10vh;
}

/* Styles the link elements when the mouse hovers over them */
.nav-link:hover {
  background: #33ccff;
}

/* This ensures the <main> element (the content of the page) begins below the navigation bar */
main {
  margin-top: 15vh;
  font-family: calibri, sans-serif;
}

/* This ensures the div "welcome-section" fills the full height of the viewport */
#welcome-section {
  height: 100vh;
}

/* This styles and positions the 'Welcome!" text*/
#welcome {
  font-size: 5vw;
  display: block;
  width: 50vw;
  margin-left: auto;
  margin-right: auto;
  padding-top: 18vh;
  text-align: center;
}

/* This styles and positions the "welcome-paragraph" */
#welcome-paragraph {
  font-size: 3vw;
  display: block;
  width: 75vw;
  position: absolute;
  margin-left: 12.5vw;
  margin-right: 12.5vw;
  margin-top: 0;
  text-align: center;
}

/* Styles the div with the class "arrow-down" into an arrow and positions it */
.arrow-down {
  border: solid black;
  border-width: 0 15px 15px 0;
  padding: 30px;
  transform: rotate(45deg);
  height: 15px;
  width: 15px;
  margin: 0 auto;
  position: relative;
  top: 20vh;
}

/* Styles the div with class "arrow-down2" into an arrow */
.arrow-down2 {
  border: solid black;
  display: block;
  border-width: 0 15px 15px 0;
  padding: 30px;
  transform: rotate(45deg);
  height: 15px;
  width: 15px;
  margin: 0 auto;
  position: relative;
  top: 20vh;
}

/* This ensures the "projects" div fills the full height of the viewport and adds a top margin */
#projects {
  margin-top: 10vh;
  height: 100vh;
}

/* This positions the header "My Projects" */
.myprojects {
  text-align: center;
  display: block;
  position: relative;
  top: 20vh;
}

/* This styles the grid container, containing the project links */
.projects-container {
  display: grid;
  position: relative;
  top: 20vh;
  grid-template-columns: 20vw 20vw 20vw 20vw;
  width: 98vw;
  margin: 0 auto;
  justify-content: space-evenly;
}

/* This ensures the grid items (project tiles) are displayed as one column on a mobile phone screen */
@media only screen and (max-width: 768px) {
  .projects-container {
    grid-template-columns: 40vw 40vw;
    row-gap: 2vh;
  }
}

/* This styles the images and makes them responsive */
img {
  border: solid #ffe6f3 0.7vw;
  max-width: 100%;
}

/* This styles the captions to the images */
.project-tile  {
  text-align: center;
  text-decoration: none;
}

/* This ensures the "contact" div fills the full height of the viewport */
#contact {
  height: 80vh;
  margin-top: 20vh;
}

/* This centers the text in the "Contact" section */
.center {
  text-align: center;
  display: block;
}

              
            
!

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