How to Change Flag Location?

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

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, 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)?

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

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


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.

1 Like

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?

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

Thanks again!

1 Like

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