Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: Changing column width of array text

Changing column width of array text 11 Monate 4 Wochen her #95326

  • Limer2001
  • Limer2001s Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 18
  • Dank erhalten: 2
  • Karma: 0
Hi,

how can I change the column width for questions of the type: array text?

I want the question textcolumn to be 5% first column 70% second answer column 25%.

Tried different things with css and javascript but can't get it to work..

I'm on 2.00+ Build 130423
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Changing column width of array text 11 Monate 4 Wochen her #95335

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 3837
  • Dank erhalten: 688
  • Karma: 330
Try something like this in the source of the question:

<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {
		var qID = {QID};
 
		$('#question'+qID+' .subquestions-list col').css({
			'width':'auto'
		});
		$('#question'+qID+' .subquestions-list thead td').css({
			'width':'5%'
		});
		$('#question'+qID+' .subquestions-list thead th:eq(0)').css({
			'width':'70%'
		});
		$('#question'+qID+' .subquestions-list thead th:eq(2)').css({
			'width':'25%'
		});
		$('#question'+qID+' .subquestions-list input[type="text"]').css({
			'width':'90%'
		});
	});
</script>
Cheers,
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.

Changing column width of array text 11 Monate 4 Wochen her #95338

  • Limer2001
  • Limer2001s Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 18
  • Dank erhalten: 2
  • Karma: 0
Thank you it's working with the standard template I just need to make it work with my own...
Anhang:
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Changing column width of array text 11 Monate 4 Wochen her #95340

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 3837
  • Dank erhalten: 688
  • Karma: 330
That's because you have a JavaScript error - imagetick_lime.js is called before jQuery.

In startpage.pstpl, change this:
	<script type="text/javascript" src="{TEMPLATEURL}imagetick_lime.js"></script>	
	{TEMPLATEJS}

To this:
	{TEMPLATEJS}
	<script type="text/javascript" src="{TEMPLATEURL}imagetick_lime.js"></script>
Cheers,
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: Limer2001

Changing column width of array text 11 Monate 4 Wochen her #95342

  • Limer2001
  • Limer2001s Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 18
  • Dank erhalten: 2
  • Karma: 0
Thank you!

Der Administrator hat öffentliche Schreibrechte deaktiviert.
Moderatoren: ITEd
Ladezeit der Seite: 0.134 Sekunden
Donation Image