Device sensitive templates?

Could someone here possibly help me?

I use the links below in the “header” of each Anki card to access the corresponding iOS apps on the iPhone directly from within Anki.

I rarely learn on the Mac, but when I do, it obviously doesn’t make sense since I don’t have the apps available there, of course. Instead, I would want to link the appropriate websites there.

But I don’t know how to say in the Card Template or CSS, use device sensitive the one only in the mobile version and the other only in the desktop version of Anki?

Does anyone have a tip for me?

Thanks.

@dae

<div style=

"

text-align:left;

margin-top:0px;

margin-left:0px;

margin-bottom:-20px;

font-size:25px;

"

<a href=

"

ldoce://

"

      

  

<a href=

"

dictccplus://

"

    

         

<a href=

"

deepl://

"

      

 

<a href=

"

google://

"

      

you can add an id to your div, like so:

<div id="mobile-links" style=" ...

and then put something like this in the styling tab:

:not(.mobile) #mobile-links{
  display: none;
}
2 Likes

More info is available here: Styling & HTML - Anki Manual

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.