Text Justification Problem

I’m having a couple of problems which may somehow be related or not, I am too technically deficient with Anki to know.

I have used 2.0 versions for several years and had no problem but 2.1x is a different kettle of fish.
I am running windows 10 pro 64bit

When I originally loaded the 2.1.26 version it was to a new rebuild of windows so everything was fresh. Here my memory is a bit fuzzy but it seemed that creating new cards was not a problem and they displayed as intended. At some point I changed the CCS background color and from that point on I have had problems.

My problem is that NONE of my text fields will center align. I use a basic reverse deck and create a card, the images will align to the center as specified by the global CSS and will move to the left and right if I change the card styling code but nothing I do, including specifically telling a field to center align will cause the text to move from left justified. This is occurring in all fields where text is placed. This occurs even if I place an image in the same field as the text (the image centers and the text whether placed before or after the image left justifies.

*I have uninstalled Anki and reinstalled it(after a reboot)
*Reverted to the old version which works ok
*Downloaded a fresh copy and installed it.(after a reboot)
*Uninstalled it and updated from the 2.1.26 load to the 2.1.29 version (after a reboot)
*The problem persists.

My other problem is that my audio will not play. Preferences indicate ‘show play button on cards with audio’ is checked. On my first time loading this I thought that perhaps I needed an add on so installed 498789867 'Replay buttons on card. It did work but now after having reinstalled Anki, it no longer displays the play button and the replay audio button just doesn’t do anything.

I know both of these problems should likely reside in different forums but I suspect that whatever the problem is, they are somehow related. I wonder if this might be some kind of registry corruption

Any help or insight would be greatly appreciated.

Thank You in advance

Can you post the CSS code you used to center-align text and the code you used to change background color?

regarding your audio problem, can you check if the mpv process is running in Task Manager?
Also open the debug console and enter the following and post the output:


Thank you for your reply

Below is a screen capture of the Front face and the and the back face with the CSS styling information(The CCS styling at this point has never been touched after upleveling to the 2.1.29 version.

As you can see on both the front and back I used the code:

<div style='font-size: "40px; color:red; text-align: center;'> {{Gr Spell}} </div> <br>

to change the words to red to make them easier to identify. On the front I attempted to force the word to align right and on the back attempted to force the word to align center while leaving the {{Gr Pronounce}} to be handled by the CSS code. As you can see, everything remains to the left.

The color is currently the default from installation. When I originally change the color all I did was substitute the word white to a different color ‘papayawhip’ which it did without problem.


Below is the screen capture of the debug console as you asked.


Hope this helps and thanks again for responding

remove text-align: __right/left/center__ from your inline styling, if you want that line to be centered.

if you have actually used this, delete the double quote sign. this should solve your problem.
<div style='font-size: 40px; color:red; text-align: center;'> {{Gr Spell}} </div>
change the center to right or left to change text alignment.

1 Like

It seems mpv is working. Could you follow the instructions posted here by @kelciour to see if that helps identify your audio problem?

Thank you for your help,

I only added the inline formatting in an attempt to force an alignment response because the CSS was not working to center the text. Originally their was no line formatting attempted as I had always used the CSS style for that purpose. I added the red to show the text affected by the code. I entered all different alignments (right and center) but got no response from Anki. Bar the text size, I had no reason to include either the color or the alignment. Removing the alignment or indeed removing the entire line of code makes no difference to the alignment.

With respect to the double quote… I scratch my head. I have no idea where I picked up that double quote when I put the code in my post(it was manually entered so perhaps a finger check … it doesn’t exist on the card so is a redherring to the problem… sorry.

can you create a deck that includes a couple of cards that have that problem and upload it so i could check them?
gofile.io if you don’t know where to upload your deck

Hope this aids it the solution

As I said, this problem first occured in 2.1.26 so I already moved to the new version 2.1.29

Here us the console input:

The resulting log file:

I appreciate your responding to this problem, I hope it helps.


I just got started on this deck as I have been trying to work through this problem. It only has 23 cards in it an most of the information is still not entered. Again thanks.


the problem is in cards themselves.
you probably have copied the text from somewhere?
you should note that anki copies the html properties and styling by default. if you with to remove the styling from the text, you should hold shift while pasting the text.

here’s one of your cards after i edited it in HTML editor (ctrl+shift+X) and removed HTML properties.

and here’s what caused the problem:

it’s visible only in HTML editor.

to solve this problem you’ll have to re-write all cards and remove formatting when pasting the text this time, or you can manually edit every card in HTML editor and remove all HTML properties.


Wow… Thank you. Interestingly I had thought this might be the problem as the information is indeed copy and pasted from excel. What I did was erase the text in the field and retype the the information directly into the card. I guess that the formatting was retained in the field even with the text removed. I will edit the cards and go from their.

Appreciate your help

P.S. I feel really silly. Created a new card and it works a treat. Their are a million things you never knew, you never know.

Thanks again.

Try reviewing some cards with audio after running the commands then post the file contents.

I too have been having issues with random entries that left align themselves.

Typically it’s fields that have been copied from word, interestingly not every field does it so text copied from an array in word to a field in anki may or may not be left aligned. I found that if I delete the field and then reenter it in anki the field is then centered correctly. It’s a nuisance as the text in the word document in each field is created in exactly the same way.

I have just noticed in the edit dialogue a option that removes formatting with a shortcut of (ctrl_r) I am hoping that when I hit the problem again the ctrl+r will fix the issue.