# How to Change Flag Location?

**URL:** <https://forums.ankiweb.net/t/how-to-change-flag-location/28445>\
**Category:** Help\
**Created:** [March 13, 2023, 10:13pm UTC](https://forums.ankiweb.net/t/how-to-change-flag-location/28445 "2023-03-13T22:13:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![AM1xAM90](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@AM1xAM90](https://forums.ankiweb.net/u/AM1xAM90)\
**Post date:** [March 13, 2023, 10:13pm UTC](https://forums.ankiweb.net/t/how-to-change-flag-location/28445/1 "2023-03-13T22:13:58Z")

</div>

When using AnkiMobile 2.0.90 (20090.2), the flag icon overlaps with my content:

 ![Anki Flag Obstruction](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/2X/6/6f1a2650e1b5fa32b5bf888c28678093338b513d.png)

I’ve searched these forums, Google, and Reddit, but I cannot move the flag with simple CSS (I can on Anki Desktop, but I’ve learned that Anki Mobile and Anki Desktop have differences under the hood, which make this difficult).

I found [this user’s post](https://www.reddit.com/r/Anki/comments/is0xfr/heres_the_code_for_custom_flags_marks_with_some/), which was incredibly useful, but they go on to state that AnkiMobile does not create flags with HTML, so this “ask” may not be possible.

I don’t have an issue with the flag colors, but can the flag itself be relocated? For the sake of learning, do CSS and JavaScript accomplish the same thing relative to Anki, or are there things JavaScript can do relative to styling that CSS cannot? Does the content and format of AnkiMobile’s HTML make a difference (i.e., [including or not including this in a card template](https://gist.github.com/kelciour/c30dd1b047368cf7f972296ce114238c))?

If flag relocation isn’t an option, how might I proceed? I’d be grateful for any input or recommendations. Thanks!

---

<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:** [March 15, 2023, 7:04am UTC](https://forums.ankiweb.net/t/how-to-change-flag-location/28445/2 "2023-03-15T07:04:12Z")

</div>

I’m afraid the flag location can’t be customized, so you’ll need to adjust the position of your card content instead - you could add a larger top margin to push the text below the flag for example, by eg changing

```
margin: 0px auto; /* Center Card in Middle */

```

to

```
margin: 40px auto; /* Center Card in Middle */

```

Please note the styling in this shared deck appears to contain scripts/HTML which is not valid, and may break in the future. I recommend you report the issue to the deck author.

---

<div class="post-metadata">

**Author:** ![AM1xAM90](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@AM1xAM90](https://forums.ankiweb.net/u/AM1xAM90)\
**Post date:** [March 16, 2023, 9:10pm UTC](https://forums.ankiweb.net/t/how-to-change-flag-location/28445/3 "2023-03-16T21:10:31Z")

</div>

Thanks for the response, @dae! I’ll follow your recommendation.

Per the second question about adding the HTML provided in this link, should I include that inside the CSS style template?

---

<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:** [March 17, 2023, 4:31am UTC](https://forums.ankiweb.net/t/how-to-change-flag-location/28445/4 "2023-03-17T04:31:00Z")

</div>

You should locate the 0px text in my post in your styling section, and change it to the 40px line I provided.

---

<div class="post-metadata">

**Author:** ![AM1xAM90](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@AM1xAM90](https://forums.ankiweb.net/u/AM1xAM90)\
**Post date:** [March 20, 2023, 5:56pm UTC](https://forums.ankiweb.net/t/how-to-change-flag-location/28445/5 "2023-03-20T17:56:03Z")

</div>

Thanks again!

---

<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:** [April 19, 2023, 5:56pm UTC](https://forums.ankiweb.net/t/how-to-change-flag-location/28445/6 "2023-04-19T17:56:41Z")

</div>

Closed on April 19, 2023, 5:56pm UTC

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