Our site needs some color swatches for our products and the boss wants them to look exactly as they do in the print catalog. This means a horizontal row of squares, each a different color, and with the name of that color overlaid in its absolute center. Like so:
I've tried two different methods for making the swatches on our web site follow this established convention, but it's just not happening for some reason. And, yes, I am still a bit of a newbie, it would seem.
Here's my first attempt, using a display:table/display:table-cell method:
<p>Standard Ink Colors</p>
<ul class="color-list">
<li id="thumb-red">
<p>Red</p>
</li>
<li id="thumb-orange">
<p>Orange</p>
</li>
<li id="thumb-athleticgold">
<p>Athletic Gold</p>
</li>
</ul>
<p>Be sure to specify Standard ink color above or provide us with your PMS ink number. </p>
Everything lines up along the last baseline of text.
So I tried using Flexbox:
<p>Standard Ink Colors</p>
<ul class="color-list">
<li id="thumb-red">Red</li>
<li id="thumb-orange">Orange</li>
<li id="thumb-athleticgold">Athletic Gold</li>
</ul>
<p>Be sure to specify Standard ink color above or provide us with your PMS ink number. </p>
Similar problem, only now things line up on the first baseline.
Is there any fix for this?