don't wrap template in div; reference #card instead

We want the background color to fill the card area rather than only the size
of the card content, so we need to set the CSS for the outer container
instead.
This commit is contained in:
Damien Elmes 2011-11-28 14:45:43 +09:00
parent ddd890ee75
commit 223cc48052
2 changed files with 8 additions and 4 deletions

View file

@ -686,7 +686,7 @@ did in %s and queue = 2 and due <= :lim %s limit %d""" % (
def finishedMsg(self):
return ("<b>"+_(
"Congratulations! You have finished the selected deck for now.")+
"Congratulations! You have finished for now.")+
"</b><br><br>" + self._nextDueMsg())
def _nextDueMsg(self):

View file

@ -449,9 +449,13 @@ order by ordinal""", mid)):
else:
bg = t['bg']
t[k] = '''\
<div style="text-align:%s;background-color:%s">\n\n%s\n\n</div>''' % (
("center", "left", "right")[t['align']],
bg, t[k])
<style>
#card {
text-align:%s;
background-color:%s;
}
</style>\n\n%s''' % (("center", "left", "right")[t['align']],
bg, t[k])
# remove obsolete
del t['bg']
del t['align']