Just add display: flex; flex-direction: column;
to your class div.stickycontainer
.
If you want to align center you can add text-align: center;
to the same place and you can remove the vertical-align: middle;
from your inline css.
Btw, why do you need to have inline CSS and normal CSS ?
div.sticky {
position: -webkit-sticky;
position: sticky;
top: 3em;
background-color: white;
padding: 10px;
width: 100%;
height: 60px;
margin: auto;
z-index: 10;
}
div.stickycontainer {
width: 50%;
margin: 0 auto;
position: relative;
right: 100px;
/*vertical-align: middle;*/
top: 0.3em;
padding-left: 80px;
display: flex; /* ADDED */
flex-direction: column; /* ADDED */
text-align: center; /* ADDED */
}
<div class="sticky">
<div class="stickycontainer">
<input type="search" placeholder="Type any course code or keyword and scroll to see all results..." title="Type any course code or keyword and scroll to see all results..." class="form-control search-input" data-table="data-list"/>
<a href="#home"><i class="fa fa-home" aria-hidden="true"></i> Home</a>
</div>
</div>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…