0

I think the title explains this well. Basically the sidebar sticks in one position. I like where it is but I don't want it to be fixed. When I remove position: fixed; it just stacks on top of the content.

HTML

<div class="sideBarLeft">
...
</div>
<div class="content">
...
</div>

CSS

div.content {
    background-color: rgba(0, 0, 0, 0.500);
    padding-left: 250px;
    padding-right: 250px;
    margin-left: 250px;
    margin-right: 250px;
}
div.leftSideBar {
    width: 160px;
    position: fixed;
    z-index: 2;
    top: 1;
    left: 0;
    background-color: rgba(0, 0, 0, 0.500);
    overflow-x: hidden;
    margin-left: 5px;
    margin-top: 5px;
    text-align: left;
    padding-left: 5px;
}
UCYT5040
  • 114
  • 8

1 Answers1

1

position:absolute will use the same left/top position, except it will not be stuck in place.

imvain2
  • 15,480
  • 1
  • 16
  • 21