-1

There is a logo in the bottom right, which I removed the link because it will not get the image due to where its located. Aside from that, the background behind it and the <div class="green"></div>is supposed to be colored with #104723; but it will not apply it?? Why is that?

I applied the color style as well as the background-color style and nothing happens, even if I include the !important tag.

  .green{ color: #104723;}
  header {
                text-align:center;
                background: #104723;
                overflow:auto;
            }
            .flexbox-container {
                display:flex;
                align-items:center;
                background:#f2f2f2;
                width: 100%;
                padding: 0px auto;
                margin: 0px auto;
                height: auto;
                min-height: 10%;
            }
            #s4-bodyContainer {
                margin: 0;
                width: 100%;
                }
            #MSOZone {
                margin: 0;
            }
            footer {
                background: #104723;
                color: #104723;
                height: 85px;
                width: 100%;
            }
            .headhead {
                color: white;
            }  
            .flexbox-container > * {
                flex:1;
                min-width:0;
                margin:0;
            }
            .tst{
                position: relative;
                line-height: 0;
                font-size: 0;
            }
            .troopers {
                max-width:100%;
                filter: drop-shadow(2px 2px 5px #000);
                display: block;
            }
            button {
                display:block;
                margin-top:50px; 
            }
            .black {
                font-size:25px;
                color: #104723;
                font-weight: bold;
            }
            .logo {
                float: right;
                margin-top: 5px;
                margin-bottom: 5px;
                margin-right: 5px;
            }
            .gold {
                font-size: 35px;
                color: #b3ab7d;
                font-weight: bolder;
                margin-top: -15px;
            }
            .btn-group .button {
                background-color: #104723;
                border: 1px solid;
                color: #b3ab7d;
                padding: 15px 32px;
                text-align: center;
                text-decoration: none;
                display: inline-block;
                font-size: 16px;
                cursor: pointer;
                margin-top: 10px;
            }
            .selector {
                float: left;
                overflow: hidden;
              }
              
              .selector .btnselect {
                background-color: #104723;
                border: 1px solid;
                color: #b3ab7d;
                padding: 15px 32px;
                text-align: center;
                text-decoration: none;
                display: inline-block;
                font-size: 16px;
                cursor: pointer;
                margin-top: 10px;
            }
              .item-select {
                display: none;
                position: absolute;
                background-color: #e7e7e7;
                min-width: 160px;
                box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
                z-index: 1;
              }
              .item-select a {
                float: none;
                color: black;
                padding: 12px 16px;
                text-decoration: none;
                display: block;
                text-align: left;
              }
              .ms-wpContentDivSpace {
                height: auto !important;
            }
              .item-select a:hover {
                background-color: #ddd;
                color: black;
              }
              
              .ms-webpartPage-root{
            border-spacing:0px!important;
            }
            .ms-webpartzone-cell {
                     margin: 0px !important;
                 }
            
              .selector:hover .item-select {
                display: block;
              }
              #sideNavBox { DISPLAY: none }
              #contentBox { margin-left: 0 }
              #contentRow {
                  width: 101%;
              }
            .flexbox-container {
                margin-top: -30px;
                width: 100%;
                height: 100%;
            }
            
            html, body {margin: 0; height: 100%; overflow-x: hidden !important; overflow-y: hidden !important;}
    </style>
<!DOCTYPE html>
<html lang="en">
   <head>
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <meta charset="UTF-8">
      <title>Projects Landing Page</title>
      <link rel="stylesheet" href="css/site.css"/>
      <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
   </head>
   <body>
      <!--<header>
         <h1 class="headhead">Active Projects</h1>
         </header>-->
      <div class="flexbox-container">
         <div class="tst">
            <img class="troopers" src="https://www.usxjobs.com/wp-content/uploads/2016/05/TROOPERS-2a.png" alt="troopers"/>
         </div>
         <div>
            <h1 class="black">Welcome to the Active Projects Site</h1>
            <h1 class="gold">Going Beyond</h1>
            <div class="selector">
               <a href="" target="_blank" class="btnselect">USMC Site
               <i class="fa fa-caret-down"></i>
               </a>
               <div class="item-select">
                  <a href="" target="_blank">Contract 1</a>
                  <a href="" target="_blank">Contract 2</a>
                  <a href="" target="_blank">Contract 3</a>
                  <a href="" target="_blank">Contract 4</a>
               </div>
            </div>
            <div class="selector">
               <a href="" target="_blank" class="btnselect">Army Site 
               <i class="fa fa-caret-down"></i>
               </a>
               <div class="item-select">
                  <a href="" target="_blank">Contract 1</a>
                  <a href="" target="_blank">Contract 2</a>
                  <a href="" target="_blank">Contract 3</a>
                  <a href="" target="_blank">Contract 4</a>
                  <a href="" target="_blank">Contract 5</a>
                  <a href="" target="_blank">Contract 6</a>
               </div>
            </div>
            <div class="selector">
               <a href="" target="_blank" class="btnselect">DoD Site 
               <i class="fa fa-caret-down"></i>
               </a>
               <div class="item-select">
                  <a href="" target="_blank">Contract 1</a>
               </div>
            </div>
         </div>
      </div>
      <div class="green">
         <img src="" class="logo"/>
      </div>
   </body>
   <script>
      document.getElementsByTagName('title')[0].innerText = "Projects Landing";
   </script>
</html>
BeerusDev
  • 1,444
  • 2
  • 11
  • 30

2 Answers2

0
.green{ color: #104723;}

sets the text color to green. There's no text in that div, so you don't see a change.

.green{ background-color: #104723; }

sets the background color to green, which is probably what you want.

Additionally, if the div takes up no space, none of this will make a difference. You'll want to make sure there's visible content in it too -- an img with no source is not that.

AKX
  • 152,115
  • 15
  • 115
  • 172
-2

Use backgound-color to apply color in backgrounds.