Themen-Optionen Ansicht
Alt 17.04.2012, 16:18   #1
JensL
Administrator
Site Admin
 
Registriert seit: 02.03.2010
Beiträge: 2.470
JensL befindet sich auf einem aufstrebenden Ast
How can I adjust the layout for just a single question?
In addition to the possibilities offered by the question options you also access a lot of aspects of a question by editing the CSS file.

This can be found under Layout -> Pro Editor.

As an example we are going to show you how to disable alternating colours only for a part of the question.

Each question has it's own CSS ID which you can adress to edit just this question. This ID can be found in the source code. There are a lot of tools which can be helpful while doing such work, like browser-plugins for Firefox (WebDeveloper, Firebug) or the "Inspect Element" feature of Chrome, or you can directly take a look at the source code. Here you can search for the phrase qnameq to find the correspoding number.

As the name implies, CSS is cascading. That means you can chain up and combine differen elements. By these means it is possible to adress single elements of a question, i.E. to change the Background color. To do so, the CSS identifiers are simply deposited in the CSS file using the correct sequence.l

At the end of the CSS file you would then append the following:

Code:
#qnameq1234 .answertable td.answertext2 { background-color: hhhhhh; }
#qnameq1234 - ID of the question

.answertable - higher-ranking class in which the class answertext2 is embedded

.answertext2 - lower-ranking class

td.answertext2 - I want to adress all td's that are inferior to answertext2

In words this means, that I change the background color for all sub-classes answertext2, that are in .answertable, which again has to be inferior to the ID #qnameq1234.

The result would be, that you disable the alternating colors for the answertext elements, while it remains functional for the answer items.

Similar changes are possibly for pretty much any element of a question, when you are aware of the element's cascading.

If you want to know more about CSS in general, there are plenty of tutorials available everywhere on the internet.

Geändert von JensL (18.04.2012 um 10:40 Uhr).
JensL ist offline  
 


Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge anzufügen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

vB Code ist An.
Smileys sind An.
[IMG] Code ist An.
HTML-Code ist Aus.
Gehe zu


Alle Zeitangaben in WEZ +1. Es ist jetzt 08:57 Uhr.

unipark
© Copyright 2011 QuestBack GmbH - Unipark Forum Onlineforschung | Unipark Online-Umfrage Tool | kontakt | impressum |