The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS help please: 2 fixed divs, and one’s scrollbar’s under isn’t appearing

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #260642


    i make a fixed div to the top like this:

    .top {
      position: fixed;
      background: green;
      color: yellow;
      height: 60px;
      width: 100%;
      top: 0px;
      margin-left: 0px;
    after then, make a fixed div to the left:
    .left {
      position: fixed;
      background: red;
      color: yellow;
    width: 200px;
      overflow: scroll;

    after than, left div’s scrollbar’s deep, goes down about 50-60px. how can i start it’s scrollbar from where it’s startes (and top is finises) and html is finishes?

    kind regards!


    It’s hard to diagnose the problem from CSS alone. We need the HTML too. Try mocking up a small demo in CodePen so that we can see the problem more easily.


    If you don’t tell a fixed position element where to be…it will start from the top at 0….usually

    In this case, I would guess the 60px “down” relates to the height of the .top element.

    Give .left a top value…that should fix it..say 60px.

    Also, positioning is very inflexible for layout and there are much better methods.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.