# Device sensitive templates?

**URL:** <https://forums.ankiweb.net/t/device-sensitive-templates/33239>\
**Category:** Card Design\
**Created:** [August 15, 2023, 1:51pm UTC](https://forums.ankiweb.net/t/device-sensitive-templates/33239 "2023-08-15T13:51:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Turmfunk](https://avatars.discourse-cdn.com/v4/letter/t/ea666f/32.png) [@Turmfunk](https://forums.ankiweb.net/u/Turmfunk)\
**Post date:** [August 15, 2023, 1:51pm UTC](https://forums.ankiweb.net/t/device-sensitive-templates/33239/1 "2023-08-15T13:51:56Z")

</div>

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://

"

> 

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;

\<a href=

"

dictccplus://

"

> 

&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

\<a href=

"

deepl://

"

> 

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;

\<a href=

"

google://

"

> 

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

---

<div class="post-metadata">

**Author:** ![NielegalneApfelschor](https://avatars.discourse-cdn.com/v4/letter/n/59ef9b/32.png) [@NielegalneApfelschor](https://forums.ankiweb.net/u/NielegalneApfelschor)\
**Post date:** [August 15, 2023, 2:03pm UTC](https://forums.ankiweb.net/t/device-sensitive-templates/33239/2 "2023-08-15T14:03:06Z")

</div>

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

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

```

and then put something like this in the styling tab:

```css
:not(.mobile) #mobile-links{
  display: none;
}

```

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [August 15, 2023, 11:23pm UTC](https://forums.ankiweb.net/t/device-sensitive-templates/33239/3 "2023-08-15T23:23:34Z")

</div>

More info is available here: [Styling & HTML - Anki Manual](https://docs.ankiweb.net/templates/styling.html#platform-specific-css)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [September 14, 2023, 11:24pm UTC](https://forums.ankiweb.net/t/device-sensitive-templates/33239/4 "2023-09-14T23:24:07Z")

</div>

Closed on September 14, 2023, 11:24pm UTC

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