The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › [Solved] Inline SVG icon in an anchor not being contained
I’m trying to create an anchor button with a mixture of a span for text and some inline svg for the icon. Trouble is, is the inline SVG icon doesn’t seem to want to be contained within it’s anchor parent. Can anyone offer some advice with this?
Codepen here:
http://codepen.io/johnasp/details/bqadn
Here you go:
http://codepen.io/TheDutchCoder/pen/IasKn
It’s as simple as making the link an inline-block (as well as the svg) and then having the svg vertically align in the middle.
Awesome, thanks Dutch :-)