I am replacing a two-column table where the first column is on the left with a width about 90% and the 2nd column is on the right with a width of 10%. The following HTML does not work as the span width only is as wide as the text. When I use floats on the spans, it takes the span elements out of the layout so that the li collapses as if there’s nothing in it.
Turns out I need to set the display attribute to inline-block for the span elements. Now the width works as expected.
keywords: css width no effect