Old fat man say: when you ask how to make your solution work, instead of how to satisfy your problem, available approach get lost in lurch. There are more ways to differentiate a background than to know what column you're in. Look back, young grasshopper, into the shameful DNA of the new HTML4 css1 era, when everyone was finding useless things to do with their properties.
Remember how people faked semi-transparency and semi-anti-transparency before the advent of PNG: shared use of fixed-position equivalent bloatoshopped backgrounds.
And thus, we discover one ugly, hackish, 100% servicable method: fixed position backgrounds, yo.
<html>
<head>
<style type="text/css">
ul { margin: 0; padding: 0; column-count: 2; column-gap: 3em; }
li { background-attachment: fixed; margin: 0; padding: 0.1em 1em; list-style-type: none; }
li.r { background-image: url("RedBack.png"); }
li.b { background-image: url("BlueBack.png"); }
li.o { background-image: url("OrangeBack.png"); }
li.p { background-image: url("MagentaBack.png"); }
</style>
</head>
<body>
<ul>
<li class="r">Lorem ipsum</li>
<li class="r">Lorem ipsum</li>
<li class="r">Lorem ipsum</li>
<li class="b">Lorem ipsum</li>
<li class="b">Lorem ipsum</li>
<li class="b">Lorem ipsum</li>
<li class="o">Lorem ipsum</li>
<li class="o">Lorem ipsum</li>
<li class="p">Lorem ipsum</li>
<li class="p">Lorem ipsum</li>
</ul>
<p>dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</body>
</html>
Just remember: when someone says you can't, neither you nor they are cheating sufficiently hard.
John Haugeland is http://fullof.bs/
- BlueBack.png 2.8 kB
- OrangeBack.png 2.8 kB
- RedBack.png 2.8 kB