I want to use CSS to create a "+" button. The following nearly works:
<p><span class="a">+</span>Foo</p>
<p><span class="b">+</span>Foo</p>
with
.a
{
width:3ex;
height:3ex;
line-height: 3ex;
}
.b
{
width: 1ex;
height: 1ex;
line-height: 1ex;
}
.a, .b
{
display:inline-block;
/*display:table-cell;*/
background:red;
text-align:center;
vertical-align:middle;
margin: 0 1ex;
}
This renders in Firefox as:
Nearly there. I'd just like it to still center the plus sign in the case that the containing span is too narrow, so that it spills over both sides symmetrically.
Is that possible?