TL DR : see example at http://jsfiddle.net/97Yr6/
The way to create a funnel stack consists of pseudo-elements: with this basic markup
<ul> <li>1,234,567,890 <span>Tooltip: 0</span></li> <li>234,567,890 <span>Tooltip: 0</span></li> <li>23,456,789</li> <li>2,345,678 <span>Tooltip: 0</span></li> <li>234,567</li> <li>23,567 <span>Tooltip: 0</span></li> <li>4,567<span>Tooltip: 0</span></li> <li>789</li> <li>23 <span>Tooltip: 0</span></li> <li>4 <span>Tooltip: 0</span></li> </ul>
we could create a funnel using borders, so we can draw some kind of trapezoid as a background like this:
ul { position: relative; overflow: hidden; font: 14px Arial; margin: 0; padding: 0; list-style: none; text-align: center; } ul:before { content: ""; position: absolute; z-index: -1; left: 50%; margin-left: -120px; width: 0; border-top: 800px solid #ccc; border-left: 120px solid #fff; border-right: 120px solid #fff; }
<ul> is 100% wide, so we can give it text-align: center , and all the amounts will be centered correctly
Then the space between the elements could be obtained with pseudo-elements again:
li:after,li:before { content: ""; display: block; height: 0.4em; background: #fff; width: 100%; } li:before { border-top: 1px dotted #ccc } li:first-child:before { border: 0; }
while the tooltip text can be positioned ( position: relative must be set for <li> ), trying to set the left and margin-left properties correctly (especially for lower screen resolution, but you can use media queries for this purpose) , eg
li span { position: absolute; left: 60%; white-space: nowrap; margin-left: 100px; } li:nth-child(2) span { left: 59%; } li:nth-child(3) span { left: 58% } li:nth-child(4) span { left: 57% } li:nth-child(5) span { left: 56% } li:nth-child(6) span { left: 55% } li:nth-child(7) span { left: 54% } li:nth-child(8) span { left: 53% } li:nth-child(9) span { left: 52% } li:nth-child(10) span { left: 51% }
basically this example can even work on IE8 if you change each :nth-child with an adjacency selector (e.g. li + li + li + ... + span )
Hope this can be helpful.