Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS How to center an image inside a H2 tag

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #46335
    robonhigh
    Member

    how do i center an image inside a h2 tag ? i need it to float left and to be centered

    Thanks in advance

    #142439
    georgearnall
    Participant

    That sounds a bit hacky and unnecessary ? Could you show us how you plan on using this ?

    #142453
    Paulie_D
    Member

    Float left **and** centered?

    Does not compute.

    #142551
    Eric Gregoire
    Participant

    Do you mean vertically aligned to the center (preferably “middle”)? With an image as a child of an h2 element? You can do that with vertical-align applied to the image. Here’s a pen with a few vertical-align values and what they look like :: http://cdpn.io/dvDxy

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