Видя ваш код и угадывая будущее расширение приложения, я полагаю, что вы должны использовать flex для решения проблемы.
.tab{
text-align: center;
width: 100%;
border:black solid 1px;
black solid 1px;
position: absolute;
bottom: 0;
display: flex;
flex-wrap: wrap;
align-content: center;
justify-content: center;
}
Таким образом, ваш код будет выглядеть так, как показано ниже.
.container2 {
overflow: hidden;
height: 100vh;
width: 100%;
margin: 0;
background-color: #81A1AA;
color: white;
position: relative;
font-size: 16px;
overflow: auto;
}
/* Style the tab content */
.tabcontent {
text-align: center;
display: none;
}
.tabheading {
font-size: 16px;
padding: 10px 0;
}
.left {
float: left;
width: 50%;
height: 100vh;
display: flex;
align-items: center;
flex-direction: column;
}
.slidertab {
padding-top: 50px;
display: block;
}
.right {
float: right;
width: 50%;
height: 100vh;
}
.texttab {
position: relative;
padding: 30px 70px;
}
.rightheading {}
.righttext {
padding-bottom: 30px;
}
.button_learnmore {
box-shadow: 0px 10px 14px -7px #4A6971;
background: linear-gradient(to bottom, #4A6971 5%, #81A1AA 100%);
background-color: #4A6971;
border-radius: 8px;
display: inline-block;
cursor: pointer;
color: #ffffff;
font-size: 12px;
padding: 10px 20px;
text-decoration: none;
}
.button_learnmore:hover {
background: #B5CFD6;
color: black;
}
.button_learnmore:active {
position: relative;
top: 1px;
}
/* Style the tab */
.tab {
border: black solid 1px;
text-align: center;
width: 100%;
position: absolute;
bottom: 0;
display: flex;
flex-wrap: wrap;
align-content: center;
justify-content: center;
}
/* Style the buttons inside the tab */
.tab button {
background-color: inherit;
border: none;
outline: none;
cursor: pointer;
padding: 15px 50px;
transition: 0.3s;
font-size: 16px;
color: white;
font-family: 'Raleway', sans-serif;
}
/* Change background color of buttons on hover */
.tab button:hover {
color: #4A6971;
}
/* Create an active/current tablink class */
.tab button.active {
color: #4A6971;
}
<div class="container2">
<div id="hp_slider_1" class="tabcontent">
<div class="left">
<div class="tabheading">
<p>Heading</p>
</div>
<div class="slidertab">
<?php echo do_shortcode('[smartslider3 slider=14]');?>
</div>
</div>
<div class="right">
<div class="tabheading">
<p>Heading</p>
</div>
<div class="texttab">
<h4 class="rightheading">Content1</h4>
<p class="righttext">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation
ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit
in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<a href="#" class="button_learnmore">Learn more.</a>
</div>
</div>
</div>
<div id="hp_slider_2" class="tabcontent">
<h3>Paris</h3>
<p>Paris is the capital of France.</p>
</div>
<div id="hp_slider_3" class="tabcontent">
<h3>Tokyo</h3>
<p>Tokyo is the capital of Japan.</p>
</div>
<div id="hp_slider_4" class="tabcontent">
<h3>fourth</h3>
<p>Hello.</p>
</div>
<div class="tab">
<button class="tablinks" onclick="openCity(event, 'hp_slider_1')">Button1 </button>
<button class="tablinks" onclick="openCity(event, 'hp_slider_2')">Button2</button>
<button class="tablinks" onclick="openCity(event, 'hp_slider_3')">Button3</button>
<button class="tablinks" onclick="openCity(event,'hp_slider_4')">Button4</button>
</div>
</div>