Forums

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

Home Forums CSS :after for input[type=button]

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #146106
    onebitrocket
    Participant

    Can you add either a before or after pseudo class to form input buttons/submits /resets?

    #146109
    Paulie_D
    Member

    There are some cases, such as image tags, where they can’t but in general, if you can target them with CSS then yes, I think so.

    Not sure what you mean by a reset class/element though…

    #146110
    onebitrocket
    Participant

    I mean these

     <input type="button" class="red" value="Input button" />
        <input type="submit" class="red" value="Input submit" />
        <input type="reset" class="red" value="Input reset" />
    

    I’ve set up a webfont icon kit using icomoon and I want to apply icons such as a arrow right for submit or a cross for reset

    #146111
    Paulie_D
    Member

    Hmmm…it would appear not.

    #146112
    Paulie_D
    Member

    Couldn’t you use the icon letter-value as the “value” and apply the icon font as a property?

    http://codepen.io/Paulie-D/pen/zlAps

    #146115
    David_Leitch
    Participant

    My understanding is that you can’t use pseudo elements with empty elements, such as img or input.

    You can, however, use them with elements such as button (rather than input[type=”button”]), like I’ve done here. Hope that helps

    #146116
    Paulie_D
    Member

    My understanding is that you can’t use pseudo elements with empty elements, such as img or input.

    Mine too…I just wasn’t sure if inputs counted…I always get ‘submit’ and <button> confused. :)

    http://codepen.io/Paulie-D/pen/gJDhf

    #146117
    onebitrocket
    Participant

    Thanks

    I’ll look in to using buttons instead

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