The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › Horizontal scrolling inside
http://jsfiddle.net/tTuaF/7/
The example is clear. I want to have an horizontal scroll in the ol but the 3 is going down.
Surround the ordered list with a wrapper:
1 1 1
Remove overflow: auto from the ordered list and add it to the wrapper. Make sure the wrapper has a fixed width:
.wrapper { overflow: auto; width: 30px; } ol { width: 30px; } li { display:inline-block; }
The wrapper should now act as a window within which the ol will scroll.
You can add white-space:nowrap; to the ol block to prevent the text from wrapping.
@Meta_Ing much more elegant your way :)
@Meta_Ing your solution worked, thank you!