0 votes
in SoSci Survey (dt.) by s090509 (125 points)
edited by SoSci Survey

Hallo,

Ich muss aufgrund eines 2x2 Designs Items zwischen Gruppen randomisiert darstellen. Den Code habe ich aus dem Internet.
Der funktioniert soweit auch. Nur wäre es jetzt noch wichtig, dass das Bild mittig angezeigt wird. Wie muss der Code verändert werden?

Liebe Grüße

$zahl = value('Z001');  // Auslesen der gezogenen Zufallszahl
 
// Grafik in Abhängigkeit von der Zahl anzeigen
// (dafür wird HTML-Code verwendet)
if ($zahl == 1) {   // white-korrekt

  html('<p><img src="SE1xx1.png"></p>');
} elseif ($zahl == 2) {   //white-fehler
  html('<p><img src="SE1xx1.png"></p>');
} elseif ($zahl == 3) {  // black-korrekt
  html('<p><img src="SBEisen.png"></p>');
} elseif ($zahl == 4) {  //black-fehler
  html('<p><img src="SBEisen.png"></p>');
}

1 Answer

0 votes
by SoSci Survey (304k points)

Hier können Sie mit CSS-Formatierung arbeiten - und zwar im <p>-Tag, das Sie ohnehin schon um die Bilder gesetzt haben:

<p style="tet-align: center"><img src="SE1xx1.png"></p>

Willkommen im Online-Support von SoSci Survey.

Hier bekommen Sie schnelle und fundierte Antworten von anderen Projektleitern und direkt von SoSci Survey.

→ Eine Frage stellen


Welcome to the SoSci Survey online support.

Simply ask a question to quickly get answers from other professionals, and directly from SoSci Survey.

→ Ask a Question

...