Solution 1 :

I moved your code into an interactive snippet below. I adjusted a few things things related to the margins you had to make things more consistently spaced.

.square-link {
  z-index: 80;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  position: relative;
  align-items: flex-start;
}

.square-link a {
  border: 2px solid #373737;
  border-radius: 5px 5px 5px 5px !important;
  color: #373737;
  background-color: transparent;
  font-size: calc(7px + (26 - 18) * ((100vw - 300px) / (1600 - 300)));
  text-align: center;
  padding: 6px;
  padding-right: 2vw;
  padding-left: 2vw;
  margin-right: 1vw;
  margin-left: 1vw;
  margin-bottom: 3%;
}

.square-link a:hover,
.square-link a.active {
  background-color: #373737;
  color: #ffffff;
  transition: 0.2s
}

.dropbtn {
  border: 2px solid #373737;
  border-radius: 5px 5px 5px 5px !important;
  color: #373737;
  background-color: transparent;
  font-size: calc(7px + (26 - 18) * ((100vw - 300px) / (1600 - 300)));
  text-align: center;
  padding: 6px;
  padding-right: 2vw;
  padding-left: 2vw;
  margin-right: 1vw;
  margin-left: 1vw;
  cursor: pointer;
  overflow: hidden;
  transition: 0.2s;
}

.dropbtn-active {
  border: 2px solid #373737;
  border-radius: 5px 5px 5px 5px !important;
  color: #ffffff !important;
  background-color: #373737;
  font-size: calc(7px + (26 - 18) * ((100vw - 300px) / (1600 - 300)));
  text-align: center;
  padding: 6px;
  padding-right: 2vw;
  padding-left: 2vw;
  margin-right: 1vw;
  cursor: pointer;
  overflow: hidden;
  transition: 0.2s;
}

.dropdown {
  position: relative;
  display: block;
  z-index: 75 !important;
}

.dropdown-content {
  display: none;
  position: relative;
  background-color: #f9f9f9;
  z-index: 100 !important;
  max-width: 100%;
  margin-right: 1vw;
  margin-left: 1vw;
}

.dropdown-content a {
  color: black !important;
  text-decoration: none;
  margin-bottom: 0px;
  display: block;
  z-index: 75 !important;
  border: none;
  margin-right: 0px;
  margin-left: 0px;
  border-bottom: solid 1px #b6b6b6;
  border-radius: 0px !important;
}

.dropdown-content a:hover {
  background-color: #d1d1d1;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown:hover .dropbtn {
  color: #ffffff;
  background-color: #373737;
  transition: 0.2s;
}

.caret-down {
  color: #373737;
}
<link rel="stylesheet" href="//libapps-custom.library.curtin.edu.au/css/fontawesome.min.css?ver=5.8.11">
<div class="contentbox">
  <div class="square-link">
    <a href="">Header One</a>
    <div class="dropdown">
      <button class="dropbtn">Header Two<i class="fa fa-caret-down"></i></button>
      <div class="dropdown-content">
        <a href="">1</a>
        <a href="">2</a>
        <a href="">3</a>
        <a href="">4</a>
        <a href="">5</a>
      </div>
    </div>
    <a href="">Header Three</a>
    <a href="">Header Four</a>
    <a href="">Header Five</a>
  </div>
</div>

Solution 2 :

Please change the margin-left and margin-right property on .dropdown-content. Then it should work as expected.

.dropdown-content {
  display: none;
  position: relative;
  background-color: #f9f9f9;
  z-index: 100 !important;
  max-width: 100%;
  margin-right: 1vw; /* Change to 1vw - same as parent button */
  /* margin-left: -4vw; */ /* REMOVE */
}

Solution 3 :

Its much interesting when you know positioning relations in css , if your parent has relative and children have absolute then you dont have to adjust things it will be using parents properties .

.square-link
{
    z-index: 80;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    position: relative;
  align-items:flex-start;
}

.square-link a
{
    border: 2px solid #373737;
    border-radius: 5px 5px 5px 5px !important;
    color: #373737;
    background-color: transparent;
    font-size: calc(7px + (26 - 18) * ((100vw - 300px) / (1600 - 300)));
    text-align: center;
    padding: 6px;
    padding-right: 2vw;
    padding-left: 2vw;
    margin-right: 1vw;
    margin-bottom: 3%;
}

.square-link a:hover, .square-link a.active
{
    background-color: #373737;
    color: #ffffff;
    transition: 0.2s
}

.dropbtn {
    border: 2px solid #373737;
    border-radius: 5px 5px 5px 5px !important;
    color: #373737;
    background-color: transparent;
    font-size: calc(7px + (26 - 18) * ((100vw - 300px) / (1600 - 300)));
    text-align: center;
    padding: 6px;
    padding-left: 2vw;
  cursor: pointer;
  overflow: hidden;
  transition: 0.2s;
}

.dropbtn-active {
    border: 2px solid #373737;
    border-radius: 5px 5px 5px 5px !important;
    color: #ffffff !important;
    background-color: #373737;
    font-size: calc(7px + (26 - 18) * ((100vw - 300px) / (1600 - 300)));
    text-align: center;
    padding: 6px;
    padding-right: 2vw;
    padding-left: 2vw;
  cursor: pointer;
  overflow: hidden;
  transition: 0.2s;
}

.dropdown {
  position: relative;
  display: block;
  z-index: 75 !important;
  margin-right: 1vw;
}

.dropdown-content {
  display: none;
  position: absolute;;
  background-color: #f9f9f9;
  z-index: 100 !important;
  max-width: 100%;
  min-width:100%;
}

.dropdown-content a {
  color: black !important;
  text-decoration: none;
  margin-bottom: 0px;
  display: block;
  z-index: 75 !important;
  border: none;
 margin-right: 0px;
 border-bottom: solid 1px #b6b6b6;
border-radius: 0px !important;
}

.dropdown-content a:hover {background-color: #d1d1d1;}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown:hover .dropbtn {
  color: #ffffff;
  background-color: #373737;
  transition: 0.2s;
}

.caret-down
{
    color: #373737;
}
<link rel="stylesheet" href="//libapps-custom.library.curtin.edu.au/css/fontawesome.min.css?ver=5.8.11">
<div class="contentbox">
  <div class="square-link">
    <a href="">Header One</a>
    <div class="dropdown">
      <button class="dropbtn">Header Two<i class="fa fa-caret-down"></i></button>
      <div class="dropdown-content">
        <a href="">1</a>
        <a href="">2</a>
        <a href="">3</a>
        <a href="">4</a>
        <a href="">5</a>
      </div>
    </div>
    <a href="">Header Three</a>
    <a href="">Header Four</a>
    <a href="">Header Five</a>
  </div>
</div>

Problem :

How do I centre the drop-down element with the main header it comes from in the following code? I’ve tried margin: auto and text-align: center but can’t seem to get anything to work, below is the closest I could get it to how I want it, but it’s aligned far too much to the left. I’ve included a code pen below:

CSS:

.square-link
{
    z-index: 80;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    position: relative;
  align-items:flex-start;
}

.square-link a
{
    border: 2px solid #373737;
    border-radius: 5px 5px 5px 5px !important;
    color: #373737;
    background-color: transparent;
    font-size: calc(7px + (26 - 18) * ((100vw - 300px) / (1600 - 300)));
    text-align: center;
    padding: 6px;
    padding-right: 2vw;
    padding-left: 2vw;
    margin-right: 1vw;
    margin-bottom: 3%;
}

.square-link a:hover, .square-link a.active
{
    background-color: #373737;
    color: #ffffff;
    transition: 0.2s
}

.dropbtn {
    border: 2px solid #373737;
    border-radius: 5px 5px 5px 5px !important;
    color: #373737;
    background-color: transparent;
    font-size: calc(7px + (26 - 18) * ((100vw - 300px) / (1600 - 300)));
    text-align: center;
    padding: 6px;
    padding-right: 2vw;
    padding-left: 2vw;
    margin-right: 1vw;
  cursor: pointer;
  overflow: hidden;
  transition: 0.2s;
}

.dropbtn-active {
    border: 2px solid #373737;
    border-radius: 5px 5px 5px 5px !important;
    color: #ffffff !important;
    background-color: #373737;
    font-size: calc(7px + (26 - 18) * ((100vw - 300px) / (1600 - 300)));
    text-align: center;
    padding: 6px;
    padding-right: 2vw;
    padding-left: 2vw;
    margin-right: 1vw;
  cursor: pointer;
  overflow: hidden;
  transition: 0.2s;
}

.dropdown {
  position: relative;
  display: block;
  z-index: 75 !important;
}

.dropdown-content {
  display: none;
  position: relative;
  background-color: #f9f9f9;
  z-index: 100 !important;
  max-width: 100%;
  margin-right: -4vw;
  margin-left: -4vw;
}

.dropdown-content a {
  color: black !important;
  text-decoration: none;
  margin-bottom: 0px;
  display: block;
  z-index: 75 !important;
  border: none;
 margin-right: 0px;
 border-bottom: solid 1px #b6b6b6;
border-radius: 0px !important;
}

.dropdown-content a:hover {background-color: #d1d1d1;}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown:hover .dropbtn {
  color: #ffffff;
  background-color: #373737;
  transition: 0.2s;
}

.caret-down
{
    color: #373737;
}

HTML:

<link rel="stylesheet" href="//libapps-custom.library.curtin.edu.au/css/fontawesome.min.css?ver=5.8.11">
<div class="contentbox">
    <div class="square-link">
        <a href="">Header One</a>
<div class="dropdown">
  <button class="dropbtn">Header Two<i class="fa fa-caret-down"></i></button>
  <div class="dropdown-content">
  <a href="">1</a>
  <a href="">2</a>
    <a href="">3</a>
  <a href="">4</a>
  <a href="">5</a>
  </div>
</div>
 <a href="">Header Three</a>
<a href="">Header Four</a>
<a href="">Header Five</a>
    </div>
</div>

https://codepen.io/adms2000/pen/bGVJjNa

Thanks!

By