Accueil › Forums › Programmation WIMS › Programmation d’exercices OEF › comportement étrange avec css
- Ce sujet contient 11 réponses, 3 participants et a été mis à jour pour la dernière fois par
jm.evers, le il y a 11 années et 8 mois.
-
AuteurMessages
-
-
11 juin 2013 à 22:39 #1513
kelh
Participant::Bonjour,
je ne comprends pas pourquoi les codes suivants donnent des affichages différents.\statement{ <p style="background-color:black; color:white; padding:2px 2px 2px 2px; display:table;"> \(X)=\embed{r1} </p> } \answer{}{1}{type=numeric}
\statement{ <p style="background-color:black; color:white; padding:2px 2px 2px 2px; display:table;"> \(x)=\embed{r1} </p> } \answer{}{1}{type=numeric}
Merci pour vos réponses.
-
11 juin 2013 à 23:35 #1515
bernadette
Maître des clés -
12 juin 2013 à 07:29 #1516
-
12 juin 2013 à 08:27 #1517
bernadette
Maître des clés::J’avais le passage à la ligne dans les deux cas ! Le changement est un changement de taille (X / x ). Il y a ce problème pour les expressions Mathml dans une table (ce qui est le cas ici puisque tu demandes display:table). Je ne sais pas pourquoi et comment corriger (sauf à ne pas utiliser de table).
le même problème se produit dans les réponses non « embed » car dans le noyau de wims, elles sont dans des tables. Je n’ai pas encore changé car cela a un impact à beaucoup d’endroits.Une « solution » peu satisfaisante est d’imposer un minimum de largeur. Si quelqu’un a une solution plus universelle, je suis aussi preneur.
Bernadette -
12 juin 2013 à 11:50 #1518
jm.evers
Participant -
12 juin 2013 à 12:38 #1519
bernadette
Maître des clés::A normal table has exactly the same problem. I saw it in oef exercises
where the answer is given in a table : In fact exactly the example !
(it is perhaps a bog of the browser, here firefox. Does not occur with safari,
on chrome, there is no mathml).\statement{ <table><tr><td>\(x+1/2\) =\embed{r1}</td></tr> </table> } \answer{}{1/2}{type=numeric}
The source is
<table><tr><td> <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mstyle id="wims_mathml242463" mathsize="120%"><mi>x</mi><mo>+</mo><mstyle displaystyle="true"><mfrac><mrow><mn>1</mn></mrow><mrow><mn>2</mn></mrow></mfrac></mstyle></mstyle></math> = <input size="20" name="reply1" value="" /> </td></tr> </table> <table><tr><td> <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"><mstyle id="wims_mathml944784" mathsize="120%"><mi>x</mi><mo>+</mo><mn>5</mn><mo>+</mo><mstyle displaystyle="true"><mfrac><mrow><mn>1</mn></mrow><mrow><mn>2</mn></mrow></mfrac></mstyle></mstyle></math> = <input size="20" name="reply1" value="" /> </td></tr> </table>
-
12 juin 2013 à 12:47 #1521
bernadette
Maître des clés::Opera ne semble pas avoir ce bogue non plus.
Mon point de vue est qu’il ne vaut mieux pas « trafiquer » pour que cela fonctionne comme on voudrait pour un navigateur car cela risque ensuite d’être pire
J’ai essayé le code précédent dans une page html (indépendante de wims) et
le problème est le même.Bernadette
A propos, pour Mathml, il semble y avoir des avancées puis des reculs :
-
Cette réponse a été modifiée le il y a 11 années et 8 mois par
bernadette.
-
Cette réponse a été modifiée le il y a 11 années et 8 mois par
-
12 juin 2013 à 14:02 #1523
jm.evers
Participant::This works just fine on my system using « Mozilla Firefox 20.0 » and « Opera 12.12 Build 1707 » and « Mozilla SeaMonkey 2.6.1″
\statement{
<table style= »background-color:black; color:white;
padding:2px 2px 2px 2px » >
<tr>
<th>
\(\frac{1}{2} \cdot x )
</th>
<th>
=
\embed{r1}
</th>
</tr>
</table>
}
\answer{}{1}{type=numeric} -
12 juin 2013 à 14:09 #1524
-
12 juin 2013 à 14:36 #1525
bernadette
Maître des clés -
12 juin 2013 à 14:40 #1526
-
13 juin 2013 à 09:53 #1530
jm.evers
Participant::So it is dependant on the browser, the system or the version. Not on the way to use the table (as css or normally). It is exactly what I wanted to emphasize !
Absolutely not !!!
Using the MathML + input field » together in- one table-cell
- one paragraph
- one div
is your problem.
(assuming you don’t want to work with ‘absolute width/height’)
The only sensible way to force « Mathml + inputfield » in an (optical) horizontal alignment is to use two table-cells in a single row.
<tr><td>MATHML</td><td>INPUTFIELD</td></tr>
Just try it
kind regards,
J.M. Evers
about css ,inputfields and tables
-
-
AuteurMessages
- Vous devez être connecté pour répondre à ce sujet.