Cards center-aligned, should be left aligned.

4,907 views
Skip to first unread message

Dotan Cohen

unread,
Feb 24, 2013, 4:16:50 PM2/24/13
to anki-a...@googlegroups.com
How does one configure Ankidroid 2.0.1 cards to show left-aligned? My
cards are showing center-aligned.

Furthermore, on my rooted Nook, the word-wrapping seems to assume that
the screen is about a third wider than it really is, so if a line is
so long that it must wrap, I loose about a third of each line off the
right. This issue does not seem present on the smaller Galaxy S3 with
the same Ankidroid version.

--
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com

Houssam Salem

unread,
Feb 25, 2013, 2:49:33 AM2/25/13
to anki-a...@googlegroups.com
This is happening because we have text-align: center specified in the global card style sheet in AnkiDroid. Since text-align is included in a new note type's style sheet by default, we should really remove it from AnkiDroid and leave it user-configurable. Should be a simple fix.

If you don't want to wait, you can add this to your note type's style sheet as a quick workaround: .card {text-align: left !important;}

Not sure about the word-wrap problem. It sounds like it's calculating the viewport incorrectly.

Dotan Cohen

unread,
Mar 2, 2013, 1:23:51 PM3/2/13
to anki-a...@googlegroups.com
On Mon, Feb 25, 2013 at 9:49 AM, Houssam Salem
<houssam....@gmail.com> wrote:
> This is happening because we have text-align: center specified in the global
> card style sheet in AnkiDroid. Since text-align is included in a new note
> type's style sheet by default, we should really remove it from AnkiDroid and
> leave it user-configurable. Should be a simple fix.
>
> If you don't want to wait, you can add this to your note type's style sheet
> as a quick workaround: .card {text-align: left !important;}
>
> Not sure about the word-wrap problem. It sounds like it's calculating the
> viewport incorrectly.
>

Thanks. The !important flag is not necessary I think. As for the
word-wrap problem, I think that I solved it with max-width: 95%; but I
need to test a bit more to be sure.

Houssam Salem

unread,
Mar 2, 2013, 10:11:36 PM3/2/13
to anki-a...@googlegroups.com
Yeah the !important wasn't needed, I just wasn't certain what was causing it. It should be fixed in the next release. There was an existing issue for it.

Dotan Cohen

unread,
Mar 3, 2013, 8:20:42 AM3/3/13
to anki-a...@googlegroups.com
On Sun, Mar 3, 2013 at 5:11 AM, Houssam Salem
<houssam....@gmail.com> wrote:
> Yeah the !important wasn't needed, I just wasn't certain what was causing
> it. It should be fixed in the next release. There was an existing issue for
> it.
>

I see, thanks.

sethl...@gmail.com

unread,
Aug 24, 2013, 6:29:29 PM8/24/13
to anki-a...@googlegroups.com
Was this ever resolved? I'm having the same problem right now.

Great program, in every other way. Thanks for the hard work.

Houssam Salem

unread,
Aug 24, 2013, 8:30:28 PM8/24/13
to anki-a...@googlegroups.com, sethl...@gmail.com
It was. Please try the new beta or wait for the official release.

nguyentie...@gmail.com

unread,
Feb 15, 2014, 1:16:40 PM2/15/14
to anki-a...@googlegroups.com, sethl...@gmail.com
You can try this:
open a deck, choose "Study Now", and choose "Edit" at the left bottom; then choose "Cards...", in "Back Template"; you type "text-align: left"  right after "font-size: 20px;"...then only text in your Backside is align left, text in frontside is till align center...
Goodluck and sorry for my English :)

Charles J. Daniels

unread,
Feb 16, 2014, 1:13:37 AM2/16/14
to anki-a...@googlegroups.com
I also have a nook (HD+), though not rooted. I haven't seen this issue, but, what I have heard in these groups is that, due to the very high resolution of nook screens (supercedes most other devices), it scales things in unexpected ways. Someone I recall had made themselves a custom build so that images were not showing up like thumbnails, and perhaps this is related. Just trying to contribute to locking down the cause, mind you.
--charlie
Reply all
Reply to author
Forward
0 new messages