ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Encode email tag - possible to style?

January 28, 2011 1:39pm

Subscribe [4]
  • #1 / Jan 28, 2011 1:39pm

    Krake

    72 posts

    Hi, we’re using the global variable {encode="[email protected]" title="Email me"}.

    Is it at all possible to style that to match the design and thus avoid the traditional blue link? Adding class, style etc. doesn’t seem to work, or I’m just not doing it right…

    Thanks,
    K

  • #2 / Jan 29, 2011 4:10pm

    Greg Salt

    3988 posts

    Hi Krake,

    This tag’s output should respond to any ordinary CSS rules you have in place. Does something like this simple style rule in your template head not change all the links to red (including the generated mailto)?

    <style type="text/css">
    a {
    color: #f00;
    }
    </style>

    Cheers

    Greg

  • #3 / Jan 29, 2011 5:09pm

    PhilBrienesse

    187 posts

    If you are trying to add style or class directly to the encode tag such as

    {encode=“[email protected]” title=“Email me” class="email"}

    that will not work.  You could wrap it in something else that you can hook into if that is the issue or as Greg suggests simply style all ‘a’ tags.

    {encode=“[email protected]” title=“Email me”}
  • #4 / Jan 30, 2011 2:30pm

    Krake

    72 posts

    Thanks to both of you! I’ll check out which aproach works better for me. You can close this post now.

  • #5 / Jan 31, 2011 2:18pm

    Barry Cogan

    291 posts

    Have fun choosing! Pleas post again with future issues 😊

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases