Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:
  • Seite:
  • 1
  • 2

THEMA: Column width in an array

Re: Column width in an array 1 Jahr 10 Monate her #96438

  • StuTheQ
  • StuTheQs Avatar
  • Junior Lime
  • Beiträge: 26
  • Karma: 0
Dear Tony,

Thank you for helping me out yet again.
Since the introduction of Expression Manager, you must leave a space after opening and before closing curly braces or the contents of the brace will be parsed by EM.
I'd come across that while rereading the manual after upgrading to LimeSurvey 2.00+ but, of course, hadn't realised that this was the problem here... :blush:

When I first copied and pasted the corrected script that you gave me, it didn't seem to modify the column widths as specified. I looked at the script carefully again and think that this line
// Align the answer text - feel free to experiment
		$( 'div#question{QID} table.question tbody th' ).css({'text-align':'center'});
doesn't contain the space after and before curly brackets that you referred to. I added the appropriate spaces and the script subsequently worked fine (but I'm not sure if this made a difference or not).

(By the way, I just replaced {QID} with the question ID; is {QID} a specific JavaScript function? :unsure: I Googled it but didn't really find a clear explanation)

I discovered that this script also works well with Array Dual Scales (with 'default' and 'basic' templates, at least), effectively making it possible to adjust the width of the separator column (it just requires a bit of playing around with the column width % until you get the array layout that you want). I'd already looked for this topic and found this post #94288 (Topic: array dual scale: change width of separator), which looked promising, but finally didn't seem to result in a clearcut workaround. I'm going to add a new post to this topic thread later because I'd like to see if there are also other workarounds possible (with CSS, perhaps).


Letzte Änderung: 1 Jahr 10 Monate her von StuTheQ.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Re: Column width in an array 1 Jahr 10 Monate her #96459

  • tpartner
  • tpartners Avatar
  • LimeSurvey Team
  • Beiträge: 4649
  • Dank erhalten: 928
  • Karma: 408
...is {QID} a specific JavaScript function?
{QID} is an Expression Manager variable that returns the question ID - manual.limesurvey.org/Expression_Manager#Access_to_Variables
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: StuTheQ
  • Seite:
  • 1
  • 2
Moderatoren: ITEd
Ladezeit der Seite: 0.126 Sekunden
Donation Image