I have a piece of code for a website that I'm writing, that I can't figure out.
.program_category_description {
background-color: #e0e0e0;
margin-bottom: 20px;
max-width:1300px;
}
.program_category_description .description {
display: table-cell;
padding: 2% 1% 2% 1%;
}
.program_category_description .title {
font-weight: bold;
font-size: 20px;
padding-bottom: 2%;
font-family: 'Lato', sans-serif;
}
.program_category_description .more_info {
text-align: center;
vertical-align: middle;
display: table-cell;
width: 15%;
background-color: #CE6D2B;
}
.program_category_description .more_info a {
color: white !important;
}
.more_info_btn {
font-size: 20px;
display: inline-block;
height: 100%;
width: 100%;
text-align: center;
cursor: pointer;
-o-transition: background-color .2s ease-in;
-moz-transition: background-color .2s ease-in;
-webkit-transition: background-color .2s ease-in;
transition: background-color .2s ease-in;
}
.more_info_btn:hover {
background-color: #b96226;
}
.more_info_btn:active {
background-color: #ccc;
}
<div class="article_body_section program_category_description">
<div class="description">
<div class="title">Short Term Programs</div>
<div class="description_description">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis euismod lacus vitae dui fermentum, quis lacinia risus viverra. Nulla aliquam leo quis velit dictum viverra. Duis vehicula pharetra imperdiet. Duis eleifend orci eget ultrices convallis.
Nulla nec aliqu.</div>
</div>
<div class="more_info"><a href="#"><span class="more_info_btn">More Info</span></a>
</div>
</div>
The reasoning for the span is so that the whole orange block is a clickable link. The problem is that I want the "more info" text to be centered within the block at all times. I don't want to give it specific pixel properties as I want it to stretch or get bigger when resized. The only restriction is a max-width of 1300px.
I have already tried vertical align, or adding a percentage based padding, but none work. As you can probably tell, I am not very experienced in this and learning by day, so if you see other things worth pointing out in the code, or other solutions, please do.