title: Reduce the width of a <div> block using css
body: <p>This is the page I have created :</p>
  
  <p><img src="https://i.stack.imgur.com/sKjyK.png" alt="enter image description here"></p>
  
  <p>I want to reduce the width of the block which has the orange color as a background-color, without using a number in the property width, is there any other method to do that ?</p>
  
  <p>I tried float:left; and it worked but it goes to the left I want the width to be detected automaticly due to the text lenght and in the center of the html page.</p>