Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<div class="box">
<input class="condition" placeholder="A Medical Condition">
<button class="btn1">Click</button>
@outoftime
outoftime / README.md
Last active October 23, 2017 22:36
Exported from Popcode. Click to import: https://popcode.org/?gist=816ed09493011fab38c811ecb1fd1991

Imagine you are creating a website to showcase the awards of your favorite celebrity.

Create a website that includes:

  • A title that takes up 100% of the page width
  • At least 2 columns for the content (you choose the width and content)

Example

Imagine you are creating a website to showcase the awards of your favorite celebrity.

Create a website that includes:

  • A title that takes up 100% of the page width
  • At least 2 columns for the content (you choose the width and content)

Example

@outoftime
outoftime / README.md
Last active October 23, 2017 00:19
Exported from Popcode. Click to import: https://popcode.org/?gist=57983fe231c874fe111c7c5ca22f8953

Activity: Buzzfeed Nav Bar

The CEO of Buzzfeed asked you to redesign their boring navigation bar!

You are provided the HTML and you must use your CSS skills to present 3 new designs! See if you can match the designs here:

You will need to use different values for the justify-content CSS property to get the nav items to be spaced out correctly!

Activity: Buzzfeed Nav Bar

The CEO of Buzzfeed asked you to redesign their boring navigation bar!

You are provided the HTML and you must use your CSS skills to present 3 new designs! See if you can match the designs here:

You will need to use different values for the justify-content CSS property to get the nav items to be spaced out correctly!

The CEO of Buzzfeed asked you to redesign their boring navigation bar!

You are provided the HTML and you must use your CSS skills to present 3 new designs!!

Would you like it…

Activity: Buzzfeed Nav Bar

The CEO of Buzzfeed asked you to redesign their boring navigation bar!

You are provided the HTML and you must use your CSS skills to present 3 new designs! See if you can match the designs here:

You will need to use different values for the justify-content CSS property to get the nav items to be spaced out correctly!

@outoftime
outoftime / index.html
Created October 22, 2017 15:13
Exported from Popcode.
<!DOCTYPE html>
<html>
<head>
<title>04.3 Flexbox Practice</title>
<link rel="stylesheet" href="https://rawgit.com/outoftime/c0b5a5927ed0a72f3ad7be29ff552336/raw/01842fe10e5a337cf83a8596872445fa939135ca/mild.css">
</head>
<body>
<h2>Sample 1:</h2>
<div id="sample1">
<div class="item">News</div>
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<!-- NO NEED TO CHANGE ANYTHING HERE -->
<div class="container">
<div class="boxes redbox">Red Box</div>
diff --git a/src/util/previewFrame/elementHighlighterScript.js b/src/util/previewFrame/elementHighlighterScript.js
index e1dac4a..fe2d3c6 100644
--- a/src/util/previewFrame/elementHighlighterScript.js
+++ b/src/util/previewFrame/elementHighlighterScript.js
@@ -7,25 +7,34 @@ const elementHighlighterScript = `(${function() {
}
});
+ function getOffsetFromBody(element) {
+ if (element === document.body) {