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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <script src="https://kit.fontawesome.com/96645cc1af.js"></script>
  <link rel="stylesheet" href="css/style.css">
  <link rel="stylesheet" href="css/tablet.css">
  <link rel="stylesheet" href="css/mobile.css">
 
  <title>Web Design Test Site</title>
</head>

<!-- Content -->
<body id="home">
  <div id="container">
    <header id="header" class="pad1">
      <h1 id="main-logo">Logo</h1>
      <!-- Searchbar -->
      <div id="searchbar">
        <form action="#">
        <input type="text" placeholder="Search" name="search">
        <button id="search-go" type="submit">GO</button>
        </form>
      </div>
    <!-- Button Links -->
    <div class="button-links">
      <a href="#" class="button-link"><button><i class="fas fa-male fa-5x"></i>Directory</button></a>
      <a href="#" class="button-link"><button><i class="fas fa-map-marker-alt fa-5x"></i>Location</button></a>
      <a href="#" class="button-link"><button><i class="far fa-clock fa-5x"></i>Enter Time</button></a>
      <a href="#" class="button-link"><button><i class="fas fa-plane fa-5x"></i>Travel</button></a>
      <a href="#" class="button-link"><button><i class="fab fa-wpforms fa-5x"></i>Forms</button></a>
    </div>
    </header>
  

<!-- Navbar -->
    <nav>
      <ul id="navbar">
        <li><a href="#">Departments</a></li>
        <li><a href="#">Tools</a></li>
        <li><a href="#">Associate Center</a></li>
        <li><a href="#">Project Delivery</a></li>
        <button id="welcome-user">Welcome, USER!</button>
      </ul>
    </nav>
  
<!-- Main Article Content -->
  <div id="articles">
    <div id="newslinks">
      <div id="market-news">
        <h4>Market News</h4>
        <a href="#"><li>Student Housing Heats Up in St. Louis - 10/27/14</li></a>
        <a href="#"><li>Student Housing Heats Up in St. Louis - 10/27/14</li></a>
        <a href="#"><li>Student Housing Heats Up in St. Louis - 10/27/14</li></a>
        <a href ="#" id="viewmore">+ View more</a>
      </div>
      <div id="announcements">
        <h4>Announcements</h4>
        <a href="#"><li>Student Housing Heats Up in St. Louis - 10/27/14</li></a>
        <a href="#"><li>Student Housing Heats Up in St. Louis - 10/27/14</li></a>
        <a href="#"><li>Student Housing Heats Up in St. Louis - 10/27/14</li></a>
        <a href ="#" id="viewmore">+ View more</a>
      </div>
    </div>

    
      <div class="article-company-news">
          <div class="hq-img">
            <!-- <img src="/img/tile-lg.jpg" alt="HQ img"> -->
          </div>
          <div class="company-news-content">
            <h4>Company News</h4>
            <p>Military Service Provided Excellent Professional Traning for Company Employee</p>
          </div>
      </div>
      <div class="article-3">
        <div class="leftright-article">
          <div class="img-left">
            <!-- This is the image -->
          </div>
          <div id="text-right-top">
            <h4>Company News</h4>
            <p>Tile Title Element</p>
          </div>
        </div>
        <div class="leftright-article">
          <div class="img-left">
            <!-- This is the image -->
          </div>
          <div id="text-right-bottom">
            <h4>Company News</h4>
            <p>Tile Title Element</p>
          </div>
        </div>

         
      </div>
      









  </div><!-- Article Div -->
</div> <!-- Container Div -->
</body>
</html>
              
            
!

CSS

              
                * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


/* Color Assets */
/* 
Dark blue: #003da7
blue/gray: #425363
sky blue: #5d7e95
steel blue: #768591
light gray: #c9c8c7
orange: #f98d29 */


@import url('https://fonts.googleapis.com/css?family=Roboto&display=swap');



/* Utility Classes */
.pad1 {padding: 1rem;}
.pad2 {padding: 2rem;}
.pad3 {padding: 3rem;}
.pad4 {padding: 4rem;}



html, body {
  height: 100%;
  margin-top: .5rem;
  font-family: 'Roboto', sans-serif;
}


/* Header */
#container {
  width: 1100px;
  margin: 0 auto;
  border: 1px solid black;
}
header {
  display: flex;
  /* margin-left: 10rem;
  margin-right: 10rem; */
  justify-content: space-between;
  align-content: space-between;
}

#main-logo {
  font-size: 3rem;
  flex: 1;
  font-family: 'Roboto', sans-serif;
  font-weight: 100;
  text-transform: uppercase;
  align-self: center;
}

/* #searchbar, #search-go {
  margin-right: 50px;
} */

#searchbar {
  height: 100%;
  width: 15rem;
  flex: 1;
  /* margin-top: 15px; */
  margin-right: -5px;
  align-self: center;
  
}

#searchbar form input {
  padding: 5px;
}

#searchbar form button {
  padding: 7px;
  background: #425363;
  color: white;
  border: none;
}



#header .button-link button  {
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  background-color: #f98d29;
  height: 85px;
  width: 80px;
  font-size: .75rem;
  flex: 1;
  padding-top: .5rem;
  margin-left: .5rem;
  border: none;
}


/* Navbar */
#navbar {
  display: flex;
  list-style: none;
  background: hsla(0, 2%, 76%, 0.808);
}

#navbar li {
  margin: 5px;
  font-family: 'Roboto', sans-serif;
  text-transform: uppercase;
  color: black;
  font-weight: 600;
  padding: .5rem;
}

#navbar li a:visited {
  color: black;
}

#navbar li a {
  text-decoration: none;
  color: black;
}

#navbar button {
 background: #9A9C9C;
 padding: 5px;
 color: #283138;
 border: none;
 margin-left: 23.9rem;
}

.button-links a .button-link {
  cursor: pointer;
}

/* Flex Articles */
#articles {
  display: flex;
  /* justify-content: space-between; */
  height: 100%;
  
}
#newslinks {
  display: flex;
  flex-direction: column;
  margin-top: 1rem;
  line-height: 1.5;
  width: 22rem;
}

#market-news h4 {
  text-transform: uppercase;
}

#newslinks #market-news {
  background: #c9c8c7;
  padding: 10px;
  margin-bottom: 1rem;
  list-style: square;
  color: #283138;
  font-size: .75rem;
  padding-bottom: 2rem;
  /* flex: 1; */
  
}

#newslinks #announcements{
  background: #c9c8c7;
  padding: 10px;
  margin-bottom: 1rem;
  list-style: square;
  color: #283138;
  font-size: .75rem;
  padding-bottom: 2rem;
  /* flex: 1; */
  
}
#announcements h4 {
  text-transform: uppercase;
}

#market-news a {
  color: #283138;

}

#announcements a {
  color: #283138;

}

.article-company-news {
  display: flex;
  flex-direction: column;
  /* max-height: 280px; */
  /* height: 280px; */
  /* border: 1px solid red; */
  /* overflow: hidden; */
  width: 390px;
  max-width: 390px;
  margin-left: 10px;
  margin-top: 15px;
  border: 1px solid black;
}



.hq-img {
background: url('/img/tile-lg.jpg');
background-repeat: no-repeat;
background-position: center;
display: block;
object-fit: cover;
flex: 1;
max-width: 100%;
max-height: 100%;
width: 5000px;
height: 100px;


}

.company-news-content {
  background: #003da7;
  color: #fff;
  height: 100%;
  flex: 1;
  min-height: 40%;
  max-height: 30%;
  max-width: 100%;
  font-family: 'Roboto', sans-serif;
  margin-bottom: 1rem;
}

.company-news-content h4 {
  margin: 1rem;
  text-transform: uppercase;
}

.company-news-content p {
  margin: 1rem;
  text-transform: uppercase;
}

.article-3 {
  display: flex;
  flex-direction: column;
  /* max-height: 280px; */
  /* height: 280px; */
  /* border: 1px solid red; */
  /* overflow: hidden; */
  width: 390px;
  max-width: 390px;
  margin-left: 10px;
  margin-top: 15px;
  margin-left: .75rem;
  border: 1px solid black;
}

.leftright-article{
  height: 50%;
  display: flex;
  border: 1px solid black;
}


.img-left {
  background: url('/img/tile-md.jpg');
  width: 50%;
  margin-bottom: 1rem;
  background-repeat: no-repeat;
  background-position: center;
  display: block;
  object-fit: cover;
}

#text-right-top {
  background-color: #425363;
  color: #fff;
  width: 100%;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

#text-right-top h4 {
  margin: 1rem;
  font-size: 1.3rem;
}

#text-right-top p {
  margin: 1rem;
  font-size: 1.3rem;
}
#text-right-bottom {
  background-color: #768591;
  color: #fff;
  width: 100%;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

#text-right-bottom h4 {
  margin: 1rem;
  font-size: 1.3rem;
}

#text-right-bottom p {
  margin: 1rem;
  font-size: 1.3rem;
}





              
            
!

JS

              
                
              
            
!
999px

Console