From 5be9d2a2f126c619a8ba6c38e59cd8652ce44652 Mon Sep 17 00:00:00 2001 From: Jamie Pratt Date: Tue, 13 Dec 2011 15:52:50 +0700 Subject: [PATCH] MDL-47494 ddwtos: NOBUG css to fix alignment when superscripts and subscripts in drag boxes Fixes weird layout bug with web browsers that means the boxes will not line up. --- question/type/ddwtos/README.txt | 23 +---------------------- question/type/ddwtos/styles.css | 13 +++++++++++++ 2 files changed, 14 insertions(+), 22 deletions(-) diff --git a/question/type/ddwtos/README.txt b/question/type/ddwtos/README.txt index b3c9a993f8b..bfeeed39078 100644 --- a/question/type/ddwtos/README.txt +++ b/question/type/ddwtos/README.txt @@ -15,30 +15,9 @@ This question type is compatible with Moodle 2.1+. To install using git, type this command in the root of your Moodle install git clone git://github.com/timhunt/moodle-qtype_ddwtos.git question/type/ddwtos -Then add question/type/ddwtosto your git ignore. +Then add question/type/ddwtos to your git ignore. Alternatively, download the zip from https://github.com/timhunt/moodle-qtype_ddwtos/zipball/master unzip it into the question/type folder, and then rename the new folder to ddwtos. - - -Note that, if you put superscripts and subscripts in your drag boxes, then there -is a weird layout bug with web browsers that means the boxes will not line up. -You can solve this by putting something like this in your theme CSS: -/* - * Superscript and subscript: don't use default styling, it does weird things to - * line height. This fix comes from https://github.com/necolas/normalize.css - */ -sub, -sup { - font-size: 80%; - position: relative; - vertical-align: baseline; -} -sup { - top: -0.4em; -} -sub { - bottom: -0.2em; -} diff --git a/question/type/ddwtos/styles.css b/question/type/ddwtos/styles.css index f8efdfc1cf2..6332fb9a7d9 100644 --- a/question/type/ddwtos/styles.css +++ b/question/type/ddwtos/styles.css @@ -80,3 +80,16 @@ .que.ddwtos .group8 { background-color: #F0E68C; } + +.que.ddwtos sub, +.que.ddwtos sup { + font-size: 80%; + position: relative; + vertical-align: baseline; +} +.que.ddwtos sup { + top: -0.4em; +} +.que.ddwtos sub { + bottom: -0.2em; +}