I'm currently working on designing a horizontal legend using html/css. The design consists of colored boxes with text beside them, followed by some spacing, then another colored box with more text, and repeating in this pattern.
[blue] - LabelA [green] - LabelB [red] - LabelC
However, I'm facing challenges in making this layout cross-browser compatible. Despite experimenting with various combinations of floating divs/spans, I'm unable to achieve the desired result. Either the text overlaps with the colored box or I struggle with adding padding to separate each key within the legend.
How would you approach solving this issue?