horizontal-scrolling

How can I make my background-color fill all my content, even with horizontal scrolling?

拥有回忆 提交于 2020-07-19 07:27:47
问题 I'm using an <ol> to show a code snippet with line numbers. Since I'm showing program code, I disable wrapping (and enable indentation) by setting white-space: pre on li , which means an li 's content can extend past the right margin and cause the page to have a horizontal scroll bar. So far so good. The problem comes when I want to set background colors on some of the li s to call out particular lines of code. I can set background-color on the li , but the color only extends to the right

How can I make my background-color fill all my content, even with horizontal scrolling?

拜拜、爱过 提交于 2020-07-19 07:27:06
问题 I'm using an <ol> to show a code snippet with line numbers. Since I'm showing program code, I disable wrapping (and enable indentation) by setting white-space: pre on li , which means an li 's content can extend past the right margin and cause the page to have a horizontal scroll bar. So far so good. The problem comes when I want to set background colors on some of the li s to call out particular lines of code. I can set background-color on the li , but the color only extends to the right

Horizontal scrollbar only appearing at bottom of page

夙愿已清 提交于 2020-05-10 09:07:19
问题 I have a page with the following HTML structure... <html> ... <body> <div class="wrapper"> ... </div> </body> </html> The .wrapper is being set at min-width: 1100px for reasons I won't go into. Therefore when the browser is resized to less than 1100px I want a horizontal scrollbar to appear. My CSS is as follows: html { overflow-x: scroll; height: 100%; } body { overflow: auto; } .wrapper { min-width: 1100px; margin: 0 auto; } For some reason the only horizontal scrollbar showing is one when

Horizontal scrollbar only appearing at bottom of page

喜夏-厌秋 提交于 2020-05-10 09:06:51
问题 I have a page with the following HTML structure... <html> ... <body> <div class="wrapper"> ... </div> </body> </html> The .wrapper is being set at min-width: 1100px for reasons I won't go into. Therefore when the browser is resized to less than 1100px I want a horizontal scrollbar to appear. My CSS is as follows: html { overflow-x: scroll; height: 100%; } body { overflow: auto; } .wrapper { min-width: 1100px; margin: 0 auto; } For some reason the only horizontal scrollbar showing is one when

Horizontal scrollbar only appearing at bottom of page

一世执手 提交于 2020-05-10 09:06:14
问题 I have a page with the following HTML structure... <html> ... <body> <div class="wrapper"> ... </div> </body> </html> The .wrapper is being set at min-width: 1100px for reasons I won't go into. Therefore when the browser is resized to less than 1100px I want a horizontal scrollbar to appear. My CSS is as follows: html { overflow-x: scroll; height: 100%; } body { overflow: auto; } .wrapper { min-width: 1100px; margin: 0 auto; } For some reason the only horizontal scrollbar showing is one when

Horizontal Scrolling on React Component Using Vertical Mouse Wheel

五迷三道 提交于 2020-04-16 05:06:50
问题 I have a component that resizes into a horizontal row of bootstrap cards when in a smaller desktop window. For users without a horizontal mouse wheel and not using a touchpad, I would like to allow users to scroll horizontally using their vertical mouse wheel movements when hovering over this particular component. Here is the original StackOverflow issue I based my code off of: https://stackoverflow.com/a/15343916/8387497 Horizontal Scroll helper component: function horizontalScroll (event) {

RecyclerView inside HorizontalScrollView Android

一曲冷凌霜 提交于 2020-04-11 18:33:22
问题 I am using a Recycler view inside a Horizontal Scroll View to display threaded comments like below: Comment1 Comment1Child1 Comment1Child2 Comment1Child2Child1 Comment1Child3 Comment2 etc. I have done this with the following XML: <HorizontalScrollView android:id="@+id/horizontalScrollView" android:layout_width="match_parent" android:layout_height="wrap_content" android:fillViewport="true" android:scrollbarSize="2dp"> <android.support.v7.widget.RecyclerView android:id="@+id/commentRV" android

RecyclerView inside HorizontalScrollView Android

北城余情 提交于 2020-04-11 18:32:35
问题 I am using a Recycler view inside a Horizontal Scroll View to display threaded comments like below: Comment1 Comment1Child1 Comment1Child2 Comment1Child2Child1 Comment1Child3 Comment2 etc. I have done this with the following XML: <HorizontalScrollView android:id="@+id/horizontalScrollView" android:layout_width="match_parent" android:layout_height="wrap_content" android:fillViewport="true" android:scrollbarSize="2dp"> <android.support.v7.widget.RecyclerView android:id="@+id/commentRV" android