title: How can I get my css border to wrap all the way around my html code?
body: <p>I am having an issue with a border all the way around my HTML text using CSS.</p>
  
  <p>How can I get the border to go around the text completely instead of going through the text?</p>
  
  <p>My HTML and CSS code is the following:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.header2 {
      position: relative;
      float: left;
      height: 75px;
      width: 1250px;
      background-color:white;
      left: 50px;
      top: 45px;
      margin-top: none;
      word-spacing: 25px;
      font-size: 14;
      border: 1px solid black;
      
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class = "header2"&gt;  
     &lt;h1&gt;News&lt;/h1&gt;
     &lt;h2&gt;
         &lt;a href="#" class="H"&gt;&lt;span&gt;Home&lt;/span&gt;&lt;/a&gt; 
         &lt;a href="#" class="N"&gt;&lt;span&gt;Caronavirus&lt;/span&gt;&lt;/a&gt;
         &lt;a href="#" class="S"&gt;&lt;span&gt;Video&lt;/span&gt;&lt;/a&gt; 
         &lt;a href="#" class="R"&gt;&lt;span&gt;World&lt;/span&gt;&lt;/a&gt;
         &lt;a href="#" class="W"&gt;&lt;span&gt;US Canada&lt;/span&gt;&lt;/a&gt; 
         &lt;a href="#" class="T"&gt;&lt;span&gt;Uk&lt;/span&gt;&lt;/a&gt; 
         &lt;a href="#" class="F"&gt;&lt;span&gt;Business&lt;/span&gt;&lt;/a&gt;
         &lt;a href="#" class="C"&gt;&lt;span&gt;Tech&lt;/span&gt;&lt;/a&gt; 
         &lt;a href="#" class="M"&gt;&lt;span&gt;Science&lt;/span&gt;&lt;/a&gt;
         &lt;a href="#" class="M"&gt;&lt;span&gt;Stories&lt;/span&gt;&lt;/a&gt;
         &lt;a href="#" class="M"&gt;&lt;span&gt;More&lt;/span&gt;&lt;/a&gt;
     &lt;/h2&gt;
  &lt;/div&gt; </code></pre>
  </div>
  </div>
  </p>
  
  <p><br><br>
  The results are the border interrupting the text at the bottom, rather than wrapping around it.</p>
  
  <p><img src="https://i.stack.imgur.com/0rdqW.png" alt="html css code 1]"></p>