I need to center sidebar vertically without using position: absolute or position: fixed, and also not using any css3 features, like flexbox and grid. I also may only use div, ul, and li elements. How can I do this?
Also, how can I position the footer at the bottom of the page with the same limitations?
This is my current solution using position: fixed: https://jsfiddle.net/gx82v4uo/
.vertical-menu {
position: fixed;
top: 50%;
transform: translateY(-50%);
right: 0px;
}
.vertical-menu ul {
padding: 0;
margin: 0;
text-align: center;
background: #2b3b75;
}
.vertical-menu li {
display: block;
color: #fff;
width: 100px;
height: 50px;
line-height: 50px;
font-size: 15px;
font-weight: bold;
}