From b40031caf0e725633d10c27636fd51c5bf809245 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 27 May 2017 13:20:50 +0530 Subject: [PATCH] Fix controls help screen not rendering properly on safari --- src/pyj/read_book/overlay.pyj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pyj/read_book/overlay.pyj b/src/pyj/read_book/overlay.pyj index 2bed32be46..6ba42dbf0a 100644 --- a/src/pyj/read_book/overlay.pyj +++ b/src/pyj/read_book/overlay.pyj @@ -291,23 +291,23 @@ class ControlsOverlay: def show(self, container): self.container_id = container.getAttribute('id') def msg(txt): - return set_css(E.div(txt), padding='1ex 1em', position='relative', top='50%', transform='translateY(-50%)') + return set_css(E.div(txt), padding='1ex 1em', text_align='center', margin='auto') container.appendChild(E.div( style=f'overflow: hidden; width: 100vw; height: 100vh; text-align: center; font-size: 1.3rem; font-weight: bold; background: {get_color("window-background")};' + 'display:flex; flex-direction: column; align-items: stretch', E.div( msg(_('Tap for controls')), - style='height: 25vh; border-bottom: solid 2px currentColor', + style='height: 25vh; display:flex; align-items: center; border-bottom: solid 2px currentColor', ), E.div( style="display: flex; align-items: stretch; flex-grow: 10", E.div( msg(_('Tap to turn back')), - style='width: 25vw; border-right: solid 2px currentColor', + style='width: 25vw; display:flex; align-items: center; border-right: solid 2px currentColor', ), E.div( msg(_('Tap to turn page')), - style='width: 75vw;', + style='width: 75vw; display:flex; align-items: center', ) ) ))