CSS “overflow” culls “background-color”

后端 未结 5 1157
再見小時候
再見小時候 2021-02-02 09:21

I\'m trying to style blocks of code for a website. The container div is set to overflow both vertically and horizontally. The problem is when it overflows horizontally, the zebr

5条回答
  •  再見小時候
    2021-02-02 10:10

    I just added {float:left} to the div's whose backgrounds were being "culled" in my situation.

    With this change the backgrounds and borders would extend with the overflowed text. So as I scroll horizontally the text is displayed uniformly with the same background and borders.

    Before adding this piece of css, the background/border would not overflow beyond div, although the text would.

提交回复
热议问题