Position:absolute causes horizontal scrollbar

前端 未结 4 1987
你的背包
你的背包 2020-12-29 02:44

Absolutely positioned (side yellow advertisements) div\'s cause unwanted horizontal scrollbar when window is resized (size decreased) beyond them. Scrollbar should appear on

4条回答
  •  庸人自扰
    2020-12-29 02:44

    // need to disable AutoScroll first, otherwise disabling the horizontal scrollbar doesn't work

    flowLayoutPanel.AutoScroll = false;
    

    // disable horizontal scrollbar

    flowLayoutPanel.HorizontalScroll.Enabled = false;
    

    // restore AutoScroll

    flowLayoutPanel.AutoScroll = true;
    

    Hope this will resolve your issue.

提交回复
热议问题