By utilizing Bootstrap, I have successfully implemented a sidebar feature. Initially, only the Font Awesome icon is visible, but upon hovering, it smoothly slides to the left revealing more content.
Challenge: Unfortunately, the sidebar lacks responsiveness on various screen sizes (perhaps due to an incorrect implementation).
The desired outcome is for only the Font Awesome icon to be displayed prior to any hover action, regardless of the screen size.
Expected display across all screen sizes:
https://i.sstatic.net/rSGID.gif
.sidebar-fixed-right {
top: 20rem;
right: -20.2%;
position: fixed;
transition-property: right;
transition-duration: 0.4s;
transition-timing-function: ease-in-out;
opacity: 0.8;
}
.sidebar-fixed-right:hover {
right: -10%;
text-decoration: none;
opacity: 1.0;
}
.sidebar-text {
padding-left: 1.2rem;
text-decoration:none;
}
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="col-md-3 pull-right sidebar-fixed-right">
<div class="widget" style="width:20rem">
<div class="widget-content widget-content-full">
<table class="table table-borderless table-striped table-vcenter">
<tbody>
<tr>
<td>
<a class="nodecoration" href="#">
<i class="fa fa-stack-overflow" style="vertical-align: middle;color: #EF5350;">
</i>
<span class="sidebar-text">Hello There</span>
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>