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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ 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

              
                
<html>
<head>
<title>Dream Land</title>
<link rel="stylesheet" href="main.css">


</head>
<body>
<!--Header-->
  <!--nav-->
  <div class="navbar">
      <a href="#">Home</a>
      <a href="#">About Us</a>
      <a href="https://lorilabriedesign.com/about/" target="_blank">Contact</a>
      <div class="dropdown">
    <button class="dropbtn">Media
      <i></i>
    </button>
    <div class="dropdown-content">
      <a href="https://www.facebook.com/">Facebook</a>
      <a href="https://twitter.com/">Twitter</a>
      <a href="https://www.linkedin.com/feed/">LinkedIn</a>
    </div>
  </div>
</div>
    </div>
    </div>

<div id="container">
  <div class="main">
<img src="https://res.cloudinary.com/dtw81jtxl/image/upload/v1532433059/dreamlandBanner_kq3whr.png" alt="dreamland"/>
  
  <h2>Finding The Best State To Live In The USA</h2>
  <p>The links below will share the current information pertaining to finding the best state to live from healthcare to climate.</p>
<!--end of nav-->
<!--Links to sites for best and worst-->
    <div class="links">
  <ul class="list">
    
    <li><a href="https://www.cbsnews.com/news/best-and-worst-states-for-health-care/">Healthcare</a></li>
    <li><a href="https://turbotax.intuit.com/tax-tips/fun-facts/states-with-the-highest-and-lowest-taxes/L6HPAVqSF">Best Income Tax</a></li>
    <li><a href="https://money.usnews.com/money/retirement/boomers/slideshows/13-states-without-pension-or-social-security-taxes">Best Tax Exempt Pension and Social Security</a></li>
    <li><a href="https://www.currentresults.com/Weather/top-10-us-states-with-best-weather.php">Best Climate</a></li>
    <li><a href="https://www.usatoday.com/story/money/business/2014/09/07/wscs-10-least-expensive-states/15075077/">Best Cost of Living</a></li>
    <li><a href="https://realestate.usnews.com/real-estate/slideshows/the-20-best-affordable-places-to-live-in-the-us">Best Housing Cost</a></li>
    <li><a href="https://www.cnbc.com/2018/04/26/these-are-the-5-worst-housing-markets-for-millennials.html">Worst Housing Cost</a></li>
      <li><a href="https://codepen.io/llabrie/full/pZvrwV/">CALCULATE</a></li>
 
  </ul>
    </div>
<!-- -->
<!--Timer-->
<div id="clock"><h3>The Clock Is Ticking!</h3></div>

</div>
  <script type="text/javascript">
function display_c(){
var refresh=1000; // Refresh rate in milli seconds
mytime=setTimeout('display_ct()',refresh)
}

function display_ct() {
var x = new Date()
document.getElementById('ct').innerHTML = x;
display_c();
 }
</script>
</head>

<body onload=display_ct();>
<div class="tick"><span id='ct' ></span></div>
</script>
<!--Footer-->

 <footer>&copy; 2017 Lori Labrie</footer>
</div>
<script src="script.js"></script>
</body>
</html>

              
            
!

CSS

              
                body {
  margin: 0 auto;
 
}

/* nav */
.navbar {
  overflow: hidden;
  background-color: #263238;
  font-family: Arial;
 top: 0;
  position: fixed;
  width: 100%;
  
 /* Set the navbar to fixed position */
/* Position the navbar at the top of the page */
/* Full width */
}

/* Links inside the navbar */
.navbar a {
  float: left;
  font-size: 16px;
  color: white;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
}


/* Change background on mouse-over */
.navbar a:hover {
    background: #ddd;
    color: black;
}

/*social media*/
.dropdown {
  float: right;
  overflow: hidden;
}

/* Dropdown button */
.dropdown .dropbtn {
  font-size: 16px;
  border: none;
  outline: none;
  color: white;
  
  background-color: inherit;
  font-family: inherit; /* Important for vertical align on mobile phones */
  margin: 15px; /* Important for vertical align on mobile phones */
}

/* Add a red background color to navbar links on hover */
.navbar a:hover, .dropdown:hover .dropbtn {
  background-color: #FF8A80;
}

/* Dropdown content (hidden by default) */
.dropdown-content {
  display: none;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);

}

/* Links inside the dropdown */
.dropdown-content a {
  float: none;
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: inline-block;
  text-align: left;
}

/* Add a grey background color to dropdown links on hover */
.dropdown-content a:hover {
  background-color: #ddd;
}

/* Show the dropdown menu on hover */
.dropdown:hover .dropdown-content {
  display: block;
}

/*end social media*/
container {
  display: flex;
  
}
.main {
margin-top: 60px; /* Add a top margin to avoid content overlay */
  
}


.links {
  margin-left: 100px;
  margin-right: 130px;
  
  
}


/* Header */

img {
  width: 100%;
  margin-top: 40px;
}

h2, h3 {
  color: #263238;
  font-family: sans-serif;
  font-weight: 500;
  text-align: center;
}

p {
  color: #263238;
  font-family: sans-serif;
  font-size: 1.2em;
  font-weight: 200;
  text-align: center;

}

/* Information Links */

.list {
  display: grid;
  grid-auto-rows: 80px;
  grid-gap: 2px;
  grid-template-columns: 1fr 1fr;

 

}

.list :nth-child(1) {
    grid-column: 1/ span 2;
}

.list :nth-child(6) {
    grid-column: 1/ span 1;
}

.list :last-child {
  grid-column: 1/ span 2;
}


li:hover {
    background-color: #FF8A80;
}

a {
    color: #263238;
    text-decoration: none;
}

a:hover {
  color: white;
}

li {
    align-items: center;
    background-color: #5DD5E1;
    color: #01579B;
    display: flex;
    font-size: 1.2em;
    font-weight: 800;
    justify-content: center;
    letter-spacing: 1px;
    text-align: center;
}

.tick {
  text-align: center;
}

footer {
  color: #263238;
  font-size: 1.2em;
  font-weight: 600;
  margin: 20px;
  

}


html, body {
  background-color:#ECEFF1 ;
}

@media screen and (max-device-width: 480px) {
  li {
    font-size: .75em;
    text-align: center;
  }
 
 }
              
            
!

JS

              
                var bestHealthCare, bestIncomeTaxes, bestTaxSocialSecurityPension, theResult, console, income, taxes, bestClimate, bestCostOfLiving, alert, i, j, k, l, m, matchFound, theBestMatch, stateList, list, inputs, input, document, num, sum, $, answer;

function listStates() {
    "use strict";
    var states = ["Hawaii", "Massachusetts", "New Hampshire", "Iowa", "Vermont", "Rhode Island", "New Jersey", "Washington", "California", "Wyoming", "Texas", "South Dakota", "Nevada", "Florida", "Alaska", "Alabama", "Illinois", "Mississippi", "Pennsylvania", "Tennessee", "Arizona", "Georgia", "South Carolina", "Delaware", "North Carolina", "Louisiana", "Arkansas", "Nebraska", "Kansas", "Indiana", "Oklahoma", "Kentucky"];
    stateList = states.sort();
    list = stateList.join(', ');
    return list;

}
console.log("Here is the list of all states included in our findings: \n" + listStates());

function bestState() {
    "use strict";
    bestHealthCare = ["Hawaii", "Massachusetts", "New Hampshire", "Iowa", "Vermont", "Rhode Island", "New Jersey", "Washington", "California"];
    bestIncomeTaxes = ["Wyoming", "Washington", "Texas", "South Dakota", "Nevada", "Florida", "Alaska"];
    bestTaxSocialSecurityPension = ["Alabama", "Alaska", "Florida", "Illinois", "Mississippi", "Nevada", "New Hampshire", "Pennsylvania", "South Dakota", "Tennessee", "Washington", "Wyoming"];
  
  var result = "Before we begin here's three groups starting with Best Healthcare: " + bestHealthCare + ". " + " Then the Best Income Tax States: " + " " + bestIncomeTaxes + ". Lastly, The Best Social Security and Pension State: "  + bestTaxSocialSecurityPension + ".";
        return result;
    
    
}

alert(bestState());


              
            
!
999px

Console