Header

~Articles This Week~

~The Code Two-Column Design~

By StarsInDust



HTML

<div class="container">

        <div class="content">

          <div class="col left">

            <img src="Images/two-column-design.png" title="" alt=""/>

          </div>

          <div class="col right">

          <h2 class="h2Gold">Two-Column Design </h2>

            <p class="LeftPSilver">This is what a flexible, two column design will look like. I have placed an image in the first div, and then the text goes into the second div. </p>

           

            <p class="LeftPSilver">If you attempt to do this yourself, you will need an image inside of your site. The image size that I used for this image is 270 px X 241 px</p>

          </div>

        </div>

    </div>

 

 

 

CSS

<style type="text/css">

 

 

*, ::after, ::before {

    box-sizing: border-box;

  }

 

 

 

  body {

    margin: 0;

    font-family:sans-serif;

    font-size: 1rem;

    font-weight: 400;

    line-height: 1.5;

    color: #212529;

  }

  img {

      max-width: 100%;

      padding-top: 3px;

      padding-right: 3px;

      padding-bottom: 3px;

      padding-left: 40px;

  }

  .container {

    width: 100%;

    max-width: 1140px;

    margin: 0 auto;

    padding-left: 15px;

    padding-right: 15px;

  }

  .content {

    display: -ms-flexbox;

    display: flex;

    -ms-flex-wrap: wrap;

    flex-wrap: wrap;

    margin-left: -15px;

    margin-right: -15px;

  }

  .content .col {

    -ms-flex: 0 0 50%;

    flex: 0 0 50%;

    max-width: 50%;

    padding-left: 15px;

    padding-right: 15px;

  }

.main {

      background-color: #111111;   

}

  .footer {

      height: 100px;

      background-color: black;

  }

 

 .LeftPSilver {

      font-family: Helvetica, Arial, sans-serif;

      font-size: 13px;

      color: Silver;

      padding-right: 5%;

      padding-left: 5%;

      line-height: 22px;

      font-weight: 500;

      text-align: left;

}

     

     

      .h2Gold {

      font-family: Georgia, "Times New Roman", Times, serif;

      color: #D5DBA4;

      ;

      font-size: 30px;

      font-weight: 500;

      text-align: center;

}

     

 

  @media(max-width: 767px){

    .content .col {

      -ms-flex: 0 0 100%;

      flex: 0 0 100%;

      max-width: 100%;

    }

  }

 

 

 

</style>