http://ataru.gomen.org/files/html/files/test.html:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Test page</title>
<style type="text/css">
.center { margin-left: auto; margin-right: auto; text-align: center; }
#listdiv { width: 400px; margin-left: auto; margin-right: auto; }
#listdiv span.left { margin-left: 20px; width: 160px; }
#listdiv span.right { margin-left: 20px; width: auto; }
</style>
</head>
<body>
<h1 class="center">Hello, world!</h1>
<div id="listdiv">
<span class="left">Data:</span>
<span class="right">Value</span><br />
<span class="left">More data:</span>
<span class="right">Another value</span><br />
</div>
</body>
</html>
I'm trying to get span elements to align themselves in two columns,
like a table except cleaner. I'm trying to make the left span
elements a certain width, but non-replaced elements can't have a width
(or so my O'Reilly CSS book claims). How can I get the effect I want
here if I can't specify a width?
--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.