Suppose you have some style and the markup:
ul
{
white-space: nowrap;
overflow-x: visible;
overflow-y: hidden;
/* added width so it would work in the snippet */
width: 100px;
}
li
{
display: inline-block;
}
<div>
<ul>
<li>1</li> <li>2</li> <li>3</li>
<li>4</li> <li>5</li> <li>6</li>
<li>7</li> <li>8</li> <li>9</li>
<li>1</li> <li>2</li> <li>3</li>
<li>4</li> <li>5</li> <li>6</li>
<li>7</li> <li>8</li> <li>9</li>
<li>1</li> <li>2</li> <li>3</li>
<li>4</li> <li>5</li> <li>6</li>
<li>7</li> <li>8</li> <li>9</li>
</ul>
</div>
When you view this. The <ul>
has a scroll bar at the bottom even though I've specified visible and hidden values for overflow x/y.
(observed on Chrome 11 and opera (?))
I'm guessing there must be some w3c spec or something telling this to happen but for the life of me I can't work out why.
UPDATE:- I found a way to achieve the same result by adding another element wrapped around the ul
. Check it out.
overflow-x hidden;
it removes the scroll but as i need the li elements to hide the border at the bottom so it gives that desired dashed effect. I don't uderstand whyoverflow-x: visible
creates a scroll bar. It shouldn't afaik. – Iodousoverflow: hidden;
and a child inserted around the<ul>
beingoverflow: visible
. – Iodous