Forums

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

Home Forums CSS Can you have HTML in a pseudo element?

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #45693
    JohnAsp
    Member

    I’m quite new to pseduo elements and am struggling to get it to render HTML. Can you not render HTML in a pseudo element as the browser just seems to print a string of text out to the page rather than rendering the element?

    I’ve made a codepen here:

    http://codepen.io/johnasp/pen/gBrdv

    #139573
    Paulie_D
    Member

    Simple answer….**NO**.

    HTML is not allowed.

    What are you trying to do?

    #139575
    CodeGraphics
    Participant

    Is it something like this: http://codepen.io/codegraphics/pen/zCnfH

    #140616
    JohnAsp
    Member

    Yes it is mate, that exactly what I was after! What’s going on there?

    #140621
    Kitty Giraudel
    Participant

    > Simple answer….NO.

    There is no complicated answer. CSS cannot generate HTML.

    #140622
    Kitty Giraudel
    Participant

    > Yes it is mate, that exactly what I was after! What’s going on there?

    Unicode. Alternatively you could use Icon fonts.

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