I have <dl>
, and can't style it to look like this:
Is it possible to style a definition list like that? Or maybe, better idea would be table?
I have <dl>
, and can't style it to look like this:
Is it possible to style a definition list like that? Or maybe, better idea would be table?
Sure, you can go with something like this (offcourse with your CSS from an external source):
This basically works:
It triggers the Double Margin Float Bug in IE6, though.
D4V360 was almost there. This variant will handle longer entries which fall over onto subsequent lines (like the example in the linked image):
Note that the
margin-left
value for thedd
element should be the same as thewidth
value of thedt
element. This is what causes subsequent lines for longer entries to start from the correct point. Adjust both values together to attain your desired spacing.