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.
This commit is contained in:
Jamie Pratt
2011-12-13 15:52:50 +07:00
parent edf84c8c63
commit 5be9d2a2f1
2 changed files with 14 additions and 22 deletions
+1 -22
View File
@@ -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;
}
+13
View File
@@ -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;
}