Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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>
  <head>
    <title>Hani Mansour</title>
    <meta charset="UTF-8" />
    <base target="_blank"/>
    <meta name="author" content="Hani Mansour">
    <meta name="Description" content="You can find us by typing @hani2up"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
   </head>
   <body>
     <h5>Assignment 1</h5>
     <!-- Assignment 1 -->
     <div class="parent">
       <div class="child-1">Full Width</div>
       <div class="child-3">1/3</div>
       <div class="child-3">1/3</div>
       <div class="child-3">1/3</div>
       <div class="child-2">1/2</div>
       <div class="child-2">1/2</div>
       <div class="child-4">1/4</div>
       <div class="child-4">1/4</div>
       <div class="child-4">1/4</div>
       <div class="child-4">1/4</div>
       <p></p>
     </div>
     <hr>
     <h5>Assignment 2</h5>
     <!-- Assignment 2 -->
     <div class="assign-2">
       <div class="normal">Normal</div>
       <div class="one">One</div>
       <div class="two">Two</div>
     </div>
   </body>
</html>
              
            
!

CSS

              
                /* Assignment 1 */

.parent {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
  width: 800px;
  margin: 50px auto;
  background-color: #eee;
}

.parent div {
  text-align: center;
  background-color: #ddd;
  padding: 20px 0;
  margin-top: 15px;
  margin-left: 15px;
  float: left;
}

p {
  clear: both;
}

.child-1 {
  width: calc(100% - 30px);
} 

.child-3 {
  width: calc((100% - 60px) / 3);
} 

.child-2 {
  width: calc((100% - 45px) / 2);
} 

.child-4 {
  width: calc((100% - 75px) / 4);
  margin-bottom: 15px;
}





/* Assignment 2 */

/* 
NOTE!
I forced to add a div and class like <div class="assign-2"> to distinguish between the assignment elements in one page.
==> you can't write it.
*/

.assign-2 div {
  margin: 20px auto;
  width: 300px;
  font-weight: bold;
  font-size: 1rem;
  padding: 20px;
  background-color: rgb(179, 179, 179); /* Get The Background From Image */
  color: black;
}

.assign-2 .one {
  background-color: rgb(179, 179, 179, 0.1);
}

.assign-2 .two {
  opacity: 0.1;
}







































































/* ----- */
hr {
  margin: 80px 0;
}
h5 {
  margin: 0 0 40px;
}
              
            
!

JS

              
                
              
            
!
999px

Console