Forums

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

Home Forums CSS CSS :before & :after

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

    Hi guys,

    Basically doing a site and after a certain paragraph I need to insert a link, using the :after statement, currently have just used the content: “”: approach but need to insert a link and can’t seem to do it?

    Is this even possible?

    Thanks

    #84778

    Short answer: no.

    A link is content, which should be handled by HTML. You should not be using CSS to insert content; CSS is meant for styling.

    Obviously using content: ”; in our CSS enables us to insert content into our markup and I’m not going to presume to know where the line between correct and incorrect usage is. But I’m fairly sure you should not be inserting a link element via CSS and as such there is no way to do it.

    Why can’t you place the link in your markup after the last paragraph?

    See here for more info: http://www.w3.org/TR/CSS2/generate.html#content

    #84811
    Ash149
    Participant

    Ok that’s what I was thinking…

    Basically doing a site for a client and would rather place the link somewhere where they can not see it, rather than in the text/html widget.

    Thanks for the response anyway :)

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