I am working with a page layout that consists of a wrapper, content div, and two item divs. The wrapper has a width of 320px, while the items together measure around 600px. I want the two item divs to display inline, allowing the content to scroll horizontally. Currently, the items are set to display as inline-block, but I need a solution to adjust the content width dynamically based on the items' total width to enable horizontal scrolling.
It is important to note that the wrapper has a fixed width and height, and vertical scrolling is disabled with overflow-y set to hidden. Only horizontal scrolling is desired, hence the overflow-x set to scroll.
If you check the JSFiddle example provided in the link, you will notice that the red divs stack vertically. Adjusting the content width manually to enable horizontal scrolling is not practical since the number of elements inside the content div is uncertain beforehand.