title: Why does my background image for div disappear?
body: <p>I'm creating a div(has a background image) that contains 2 divs inside it. The div with the background image disappears when I add a float left to the div's inside.</p>
  
  <p>Please help!</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
  &lt;head&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
  
      &lt;h2&gt;Linear Gradient as Background Image&lt;/h2&gt;
      &lt;p&gt;This linear gradient starts at the top. It starts red, transitioning to yellow:&lt;/p&gt;
  
      &lt;div id="grad1" style="background-image: URL(https://images.freecreatives.com/wp-content/uploads/2016/05/Awesome-Gradient-Background-.jpg); width:100%; margin-top:50"&gt;
             &lt;div style="width:55%; padding: 10px; float:left;"&gt;
                  &lt;img alt="abc" src="https://upload.wikimedia.org/wikipedia/commons/0/09/Blue_computer_icon.svg" style="max-width: 75%; height: auto; margin:10%; " /&gt;
             &lt;/div&gt;
             &lt;div style="width:35%;padding: 10px;float:left;"&gt;
                  &lt;h1 style="color:black; margin-top: 70px; font-weight:bolder; text-align:left;"&gt;
                  Header&lt;br&gt;
                      &lt;h3 style="color:red; text-align:left;"&gt;(Subtitle)&lt;/h3&gt;
                  &lt;/h1&gt;
                  &lt;p style="color:black;"&gt;
                      Lorem ipsum dolor sit amet, consectetur adipiscing elit, 
                      sed do eiusmod tempor incididunt ut labore et dolore magna 
                      aliqua. Ut enim ad minim veniam, quis nostrud exercitation 
                      ullamco laboris nisi ut aliquip ex ea commodo consequat. 
                      Duis aute irure dolor in reprehenderit in voluptate velit 
                      esse cillum dolore eu fugiat nulla pariatur. Excepteur 
                      sint occaecat cupidatat non proident, sunt in culpa qui 
                      officia deserunt mollit anim id est laborum.
                 &lt;/p&gt;
            &lt;/div&gt;
         &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>