title: Limit the width of the page to only half size of the browser
body: <p>I'm currently learning web design and I was solving some sample problems online, there was one specific case when I was asked to:</p>
  
  <ol>
  <li><p>Write a CSS rule that limits the width of the webpage to only half the size of the browser and centers it in the browser window.</p></li>
  <li><p>Add a CSS rule, to the rule above , to display a green background color that  fills all the browser window including the empty left and right sides.</p></li>
  </ol>
  
  <p>For 2, I could use this:</p>
  
  <pre><code>body {
      background-color: green;
  }
  </code></pre>
  
  <p>But for 1, I couldn't do it. How do I get the size of the browser? It sounds confusing.</p>