How to limit the width of a DIV

The div with class main should take only 30% in the left side of my page but it takes the full width instead. I tried to specify width but it's not working.

<!DOCTYPE html>
    <html lang="en">
        <meta charset="UTF-8">
      <div class="main">
          <div class="col-md-4">
              <div class="content-section">
                <h3>Latest Covid Info</h3>
                <p class='text-muted'>You can put any information here you'd like.
                  <ul class="list-group">
                      <li class="list-group-item list-group-item-light">Total Cases</li>
                      <li class="list-group-item list-group-item-light">Total Deaths</li>
                      <li class="list-group-item list-group-item-light">Total Population</li>
                      <li class="list-group-item list-group-item-light">Vaccinated People Count</li>
                      <li class="list-group-item list-group-item-light">Announcements</li>
                      <li class="list-group-item list-group-item-light">Calendars</li>
                      <li class="list-group-item list-group-item-light">etc</li>

Read more here:

Content Attribution

This content was originally published by Vishal Patil at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: