Forums

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

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #176004
    John A
    Participant

    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

    #176008
    TheDutchCoder
    Participant

    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.

    #176013
    John A
    Participant

    Awesome, thanks Dutch :-)

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.