I'm following this answer to insert a curly bracket before two fields in my form (there's a jsfiddle in the link):
The red * means that field is required. But actually, the user could supply one OR the other, so the proper representation would be:
But since the { comes from a <blockquote>
tag, I don't know how to add the * there, to the left of the picture (unless it's part of the picture, but that's a sub-optimal solution, because in different computers the font will be different). The fields are part of a definition list, with the label in the <dt>
and the input in the <dd>
part.
Perhaps the solution is not to use a <blockquote>
at all?
Like Daniel suggested the
:before
pseudo element is our friend here. But he did not bother to move the asterisk down to the middle. In my example, it is not perfectly vertically aligned, but I believe this is due to the curly brace image used.CSS:
Demo: http://jsfiddle.net/hopkins_matt/xc59ejrj/
The correct
top
for the above example would betop: calc(50% - 5px);