Pen Settings



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


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


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.


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.


                <div class="flex-container">
	<div id="apphead">
<head> Weather App </head>
	<div class="text">
<h3> You must enable location discovery in your browser settings for this to work! </h3>
<h3> You are located at <span id="location"></span>!</h3>
<h3> It is currently <span id="temp"></span> &#8451 with <span id="desc"></span> and a <span id="wind"></span> mph wind.</h3>



	background-repeat: no-repeat;

	display: flex;
	margin-top: 10%;
	font-size: 30px;
	color: blue;
	justify-content: center;
	align-items: center;
	font-family: Impact, charcoal, sans-serif;


                if (navigator.geolocation) {
else {
alert('Geolocation not supported');

function error() {
alert("Couldn't find you! Make sure location discovery is enabled in your browser.");

function success(position) {
	var lat = position.coords.latitude;
	var lon = position.coords.longitude;
	var Weather = "" + lat + "&lon="  + lon;
		url : Weather,
		dataType : "json",
		success : function(data){
			var location = [, data.coord.lon];
			var temp = data.main.temp;
			var desc =[0].description;
			var wind = data.wind.speed;
			var background =[0].icon
				$(".flex-container").css("background-image", "url(" + background + ")");